A Retrieval-Augmented Generation (RAG) chatbot that lets users upload .txt or .md files and then query an AI assistant for answers based solely on the uploaded document’s content.
Built with Gradio for the UI, ChromaDB for vector storage, LangChain for document processing, and the "Qwen/Qwen3-4B" LLM for inference.
📤 Upload & Process Documents – Supports .txt and .md file formats.
🔍 Context-Aware Retrieval – Uses embeddings to find the most relevant document chunks.
💬 Chat Interface – Ask questions and receive answers derived only from the uploaded file.
🧠 Small, Efficient LLM – Uses SmolLM3-3B from Hugging Face for quick responses.
🎨 Modern UI – Built with Gradio Blocks for a clean, interactive experience.
git clone https://github.com/Sai-Suraj/chatbot.git
cd chatbotCreate a Virtual Environment
uv venv .venv
source .venv/bin/activate # Linux/MacInstall Dependencies
uv pip install -r requirements.txtSet Your Hugging Face Token
export HF_TOKEN="your_huggingface_api_token" # Linux/Macpython app.pyThe app will open in your browser at:
http://127.0.0.1:7860You can run the RAG Chatbot instantly using Docker — no local setup required.
Pull the Docker image
docker pull saisuraj27729/chatbot:v2Run the container
Replace your_huggingface_api_token with your own Hugging Face API token (you can create one at Hugging Face Tokens).
docker run -p 7860:7860 -e HF_TOKEN="your_huggingface_api_token" saisuraj27729/chatbot:v2-
-p 7860:7860→ maps the app's internal port to your local machine so you can access it in your browser. -
-e HF_TOKEN=...→ sets your Hugging Face token inside the container.
Once the container starts, visit this url in your browser
http://localhost:7860
The application is also hosted on Hugging Face 🤗 Spaces.
You can try it out here: Text Markdown ChatBot
