Spaces:
Sleeping
Sleeping
Commit
·
2fbf4a0
1
Parent(s):
a7f5491
Spaces: docker SDK + clean README (UTF-8 no BOM, LF)
Browse files- .gitattributes +2 -2
- README.md +3 -21
- requirements.txt +2 -0
.gitattributes
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
* text=auto
|
2 |
-
|
|
|
1 |
+
* text=auto eol=lf
|
2 |
+
README.md text eol=lf
|
README.md
CHANGED
@@ -1,32 +1,14 @@
|
|
1 |
---
|
2 |
title: FastAPI RAG API
|
3 |
-
|
4 |
-
colorFrom: indigo
|
5 |
-
colorTo: blue
|
6 |
-
sdk: fastapi
|
7 |
-
app_file: app/api.py
|
8 |
pinned: false
|
9 |
---
|
10 |
|
11 |
# FastAPI RAG API
|
12 |
|
13 |
Minimal backend for RAG (FastAPI + FAISS + Sentence-Transformers).
|
14 |
-
Open
|
15 |
-
|
16 |
-
## Live
|
17 |
-
- API (HF Space): https://huggingface.co/spaces/HamidOmarov/FastAPI-RAG-API
|
18 |
-
- Dashboard (HF Space): https://huggingface.co/spaces/HamidOmarov/RAG-Dashboard
|
19 |
-
|
20 |
-
## What it does
|
21 |
-
Ask questions about your PDFs using vector search (FAISS) + sentence embeddings.
|
22 |
-
Robust to numeric/table-heavy docs, with optional AZ→EN translation and fallbacks.
|
23 |
|
24 |
## Quick test
|
25 |
curl -F "file=@sample.pdf" https://<API>/upload_pdf
|
26 |
-
curl -H "Content-Type: application/json" -d
|
27 |
-
|
28 |
-
## Ops
|
29 |
-
- GET /health • GET /stats • GET /get_history • POST /reset_index
|
30 |
-
|
31 |
-
## Stack
|
32 |
-
FastAPI · sentence-transformers · FAISS · pypdf · Hugging Face Spaces
|
|
|
1 |
---
|
2 |
title: FastAPI RAG API
|
3 |
+
sdk: docker
|
|
|
|
|
|
|
|
|
4 |
pinned: false
|
5 |
---
|
6 |
|
7 |
# FastAPI RAG API
|
8 |
|
9 |
Minimal backend for RAG (FastAPI + FAISS + Sentence-Transformers).
|
10 |
+
Open /docs for the interactive API.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
## Quick test
|
13 |
curl -F "file=@sample.pdf" https://<API>/upload_pdf
|
14 |
+
curl -H "Content-Type: application/json" -d "{\"question\":\"What is the document about?\",\"top_k\":5}" https://<API>/ask_question
|
|
|
|
|
|
|
|
|
|
|
|
requirements.txt
CHANGED
@@ -8,3 +8,5 @@ sentencepiece
|
|
8 |
sacremoses
|
9 |
python-multipart
|
10 |
pdfminer.six
|
|
|
|
|
|
8 |
sacremoses
|
9 |
python-multipart
|
10 |
pdfminer.six
|
11 |
+
numpy
|
12 |
+
requests
|