A newer version of the Streamlit SDK is available:
1.52.2
metadata
title: RagBot
emoji: π
colorFrom: indigo
colorTo: blue
sdk: streamlit
sdk_version: 1.32.0
app_file: app.py
pinned: false
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
π RagBot: Chatbot + Document QA
This app lets you chat with any uploaded PDF and ask questions β either from the document or general ones β powered by local open-source models. Combines RAG with chatbot UX.
π Features
- Upload PDFs and chat with them
- General knowledge + document-specific answers
- Accurate retrieval using FAISS and sentence-transformers
- Clean, sticky UI with full chat history
- Runs 100% free using lightweight Hugging Face models
π§ Powered By
- π§ Embeddings:
sentence-transformers/paraphrase-MiniLM-L6-v2 - π QA Model:
distilbert-base-cased-distilled-squad - π§° Backend: Streamlit + FAISS + Transformers
π‘ How It Works
- Upload your PDF
- App chunks & embeds the text
- Uses FAISS to retrieve context
- Hugging Face model generates answers:
- Uses the doc context if available
- Falls back to general QA
- Refuses to answer if uncertain
π¦ Dependencies
pip install streamlit faiss-cpu sentence-transformers transformers PyMuPDF