CoolFace
Apppublic

Ritambharam/medvectorai-reranker

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
App README

MedVectorAI HF Reranker Service

This service exposes a public FastAPI reranking endpoint for MedVectorAI.

Endpoint

  • POST /rerank

Request body:

{ "query": "What causes diabetes?", "chunks": [ {"text": "...", "chunkid": "..."} ], "topn": 6 }

Response body:

{ "rerankedchunks": [ {"text": "...", "chunkid": "...", "rerank_score": 0.91} ], "scores": [0.91] }

Deploy to Hugging Face Spaces (Docker)

  1. 1.Create a new Space on Hugging Face.
  2. 2.Choose SDK: Docker.
  3. 3.Upload the files in this folder:
  4. 4.app.py
  5. 5.requirements.txt
  6. 6.Dockerfile
  7. 7.After build, your endpoint URL will look like:
  8. 8.https://<space-name>.hf.space/rerank
  9. 9.Set this URL in Render env var:
  10. 10.HFRERANKAPI_URL

Health check

  • GET /health