File size: 1,389 Bytes
19d85f2
a7a634d
19d85f2
 
 
 
a7a634d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19d85f2
a7a634d
 
 
 
 
 
 
 
19d85f2
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<<<<<<< HEAD
---
=======
@'
---
>>>>>>> fb5b684 (docs: UTF-8 README with Spaces metadata; mark *.md as text; ignore README.bak.md)
title: FastAPI RAG API
emoji: 🧠
colorFrom: indigo
colorTo: blue
sdk: fastapi
app_file: app/api.py
pinned: false
---

# FastAPI RAG API

Minimal backend for RAG (FastAPI + FAISS + Sentence-Transformers).
Open `/docs` for the interactive API.

## Live
- API (HF Space): https://huggingface.co/spaces/HamidOmarov/FastAPI-RAG-API
- Dashboard (HF Space): https://huggingface.co/spaces/HamidOmarov/RAG-Dashboard

## What it does
Ask questions about your PDFs using vector search (FAISS) + sentence embeddings.
Robust to numeric/table-heavy docs, with optional AZ→EN translation and fallbacks.

## Quick test
<<<<<<< HEAD
curl -F "[email protected]" https://<API>/upload_pdf
curl -H "Content-Type: application/json" -d '{"question":"What is the document about?","top_k":5}' https://<API>/ask_question

## Ops
- GET /health • GET /stats • GET /get_history • POST /reset_index

## Stack
FastAPI · sentence-transformers · FAISS · pypdf · Hugging Face Spaces
=======
```bash
curl -F "[email protected]" https://<API>/upload_pdf
curl -H "Content-Type: application/json" -d '{"question":"What is the document about?","top_k":5}' https://<API>/ask_question
>>>>>>> fb5b684 (docs: UTF-8 README with Spaces metadata; mark *.md as text; ignore README.bak.md)