|
Download README.md from multifuly/cert-contrasitive-embedding: direct link, hf CLI and curl.
- Browser
- Download file 1.51 kB
-
https://huggingface.co/spaces/multifuly/cert-contrasitive-embedding/resolve/main/README.md
- Command line
-
hf download hf://spaces/multifuly/cert-contrasitive-embedding/README.md
-
curl -L -o README.md https://huggingface.co/spaces/multifuly/cert-contrasitive-embedding/resolve/main/README.md
1.51 kB
metadata
title: CertWeb Contrastive Embedding API
sdk: docker
app_port: 7860
Contrastive Embedding API
CertWeb RAG용 질의 → 768-dim 벡터 임베딩을 Hugging Face Spaces에서 서빙합니다.
모델은 HF 모델 리포에서 로드하며, 이 Space 리포에는 모델 파일을 올리지 않습니다.
1. 모델 리포에 올리기
HUGGINGFACE_UPLOAD.md §2 참고: model.safetensors, config.json, tokenizer*.json, config_sentence_transformers.json, modules.json, 1_Pooling/config.json 등.
2. 이 Space 만들기
- New Space → 이름 예:
certweb-contrastive-embed, SDK: Docker 선택. - 아래 올릴 파일 목록의 파일만 이 Space 리포에 업로드:
app.py,requirements.txt,Dockerfile,README.md
- Space Settings → Variables:
HF_MODEL_ID: 모델 repo ID (예:your-org/your-model-id)- (비공개 리포면)
HF_TOKEN: HF 토큰
3. CertWeb 백엔드에 연결
Render .env:
RAG_CONTRASTIVE_ENABLE=true
RAG_CONTRASTIVE_EMBEDDING_URL=https://<your-org>-certweb-contrastive-embed.hf.space
Space가 제공하는 API URL (예: https://xxx.hf.space 또는 별도 API 경로)을 그대로 넣으면 됩니다.
API 규약
POST /
Body:{"inputs": "질의 문자열"}
Response:[[float, ...]](768-dim 벡터 1개를 리스트로 감싼 형태)GET /health
Response:{"status": "ok", "model_loaded": true}