|
Download README.md from Mister2005/Cross-Encoder-Reranking-API: direct link, hf CLI and curl.
- Browser
- Download file 1.25 kB
-
https://huggingface.co/spaces/Mister2005/Cross-Encoder-Reranking-API/resolve/main/README.md
- Command line
-
hf download hf://spaces/Mister2005/Cross-Encoder-Reranking-API/README.md
-
curl -L -o README.md https://huggingface.co/spaces/Mister2005/Cross-Encoder-Reranking-API/resolve/main/README.md
1.25 kB
| title: Cross-Encoder Reranking API | |
| emoji: ⚖️ | |
| colorFrom: indigo | |
| colorTo: blue | |
| sdk: docker | |
| pinned: false | |
| app_port: 7860 | |
| # ⚖️ FinReg BGE Cross-Encoder Reranking API | |
| High-performance cloud cross-encoder re-ranking service powered by **`BAAI/bge-reranker-base`**. | |
| --- | |
| ## 🚀 Quick Usage (POST `/rerank`) | |
| ### Request | |
| ```json | |
| POST /rerank | |
| Content-Type: application/json | |
| { | |
| "query": "What are Priority Sector Lending targets under RBI norms?", | |
| "documents": [ | |
| "RBI Circular on Priority Sector Lending: Domestic commercial banks must achieve 40% of ANBC...", | |
| "SEBI Mutual Fund regulations: AMCs must maintain minimum net worth of Rs 50 Crore...", | |
| "PMLA Act: Banking entities must retain transaction records for 5 years..." | |
| ], | |
| "top_k": 2 | |
| } | |
| ``` | |
| ### Response | |
| ```json | |
| { | |
| "query": "What are Priority Sector Lending targets under RBI norms?", | |
| "model": "BAAI/bge-reranker-base", | |
| "total_evaluated": 3, | |
| "latency_ms": 42.5, | |
| "scores": [0.954, 0.001, 0.002], | |
| "ranked_indices": [0, 2, 1], | |
| "ranked_results": [ | |
| { | |
| "rank": 1, | |
| "original_index": 0, | |
| "score": 0.954, | |
| "document": "RBI Circular on Priority Sector Lending: Domestic commercial banks must achieve 40% of ANBC..." | |
| } | |
| ] | |
| } | |
| ``` | |