This project is a full-stack chatbot application powered by FastAPI for the backend and React + TypeScript for the frontend. The chatbot uses a fine-tuned Qwen2.5-3B-Instruct model to generate responses.
/frontend# React + TypeScript (User Interface)/backend# FastAPI + SQLite (API and ML Inference)
Ensure you have the following installed:
- Node.js (Recommended:
>=18.x) - Yarn (
npm install -g yarn) - Python 3.12
- Virtual Environment (venv)
- SQLite (comes bundled with Python)
- CUDA (for GPU acceleration, optional)
- Unsloth (Fine Tuning)
Download the saved GGUF Weights from GDRIVE - https://drive.google.com/file/d/12JloQZULnGc0NTeLDryThee7SmX3jmLJ/view?usp=sharing
Video Link to see the project in action - https://drive.google.com/file/d/1MjoGwq-ZAmMc6bu7eIyMeyYQtvN5RiTO/view?usp=sharing
For Environment details please go through the 'environment.yml' file. Main Libraries used are -
Unsloth Pytorch
-
Navigate to the backend folder:
cd backend -
Create a virtual environment:
python3 -m venv venv source venv/bin/activate # MacOS/Linux venv\Scripts�ctivate # Windows
-
Install dependencies:
pip install -r requirements.txt
-
Start the FastAPI server:
uvicorn app.main:app
-
Open Swagger Docs:
- API Docs: http://127.0.0.1:8000/docs
-
Navigate to the frontend folder:
cd ../frontend -
Install dependencies:
yarn install
-
Start the development server:
yarn start
-
Open the browser and go to:
| Method | Endpoint | Description |
|---|---|---|
| POST | /users/signup |
Register a new user |
| POST | /users/login |
Authenticate and receive a token |
| GET | /users/me |
Fetch logged-in user details |
| Method | Endpoint | Description |
|---|---|---|
| POST | /chats/ |
Ask a question, receive AI-generated response |
| GET | /chats/history |
Fetch last 15 questions & answers |
-
Use Gunicorn or Uvicorn for production:
uvicorn app.main:app --host 0.0.0.0 --port 8000
-
Deploy via Docker, AWS Lambda, or GCP Cloud Run.
-
Build for production:
yarn build
-
Deploy to Vercel, Netlify, or GitHub Pages.
- OAuth authentication (Google, GitHub)
- Persistent chat history with PostgreSQL
- Streaming AI responses
- Frontend UI enhancements
