Skip to content

🔥 A Retrieval-Augmented Generation (RAG) chatbot that processes .txt/.md files for contextual Q&A using LangChain, ChromaDB, and Hugging Face’s Qwen-4B LLM. ⚡ Features a modern Gradio UI.

Notifications You must be signed in to change notification settings

Sai-Suraj-27/chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 RAG Chatbot – Text & Markdown Q&A Assistant

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.

🚀 Features

📤 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.

⚙️ Installation & Setup

git clone https://github.com/Sai-Suraj/chatbot.git
cd chatbot

Create a Virtual Environment

uv venv .venv
source .venv/bin/activate   # Linux/Mac

Install Dependencies

uv pip install -r requirements.txt

Set Your Hugging Face Token

export HF_TOKEN="your_huggingface_api_token"   # Linux/Mac

▶️ Running the App

python app.py

The app will open in your browser at:

http://127.0.0.1:7860

🐳 Run with Docker

You can run the RAG Chatbot instantly using Docker — no local setup required.

Pull the Docker image

docker pull saisuraj27729/chatbot:v2

Run 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

🚀 Chatbot

The application is also hosted on Hugging Face 🤗 Spaces.
You can try it out here: Text Markdown ChatBot

Chatbot

About

🔥 A Retrieval-Augmented Generation (RAG) chatbot that processes .txt/.md files for contextual Q&A using LangChain, ChromaDB, and Hugging Face’s Qwen-4B LLM. ⚡ Features a modern Gradio UI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published