A professional AI-powered Document Assistant Website that allows users to upload any document (PDF/DOCX) and instantly chat with it using advanced NLP + Retrieval Augmented Generation (RAG).
🔗 https://mahil27.github.io/AI-DOC-ASSISTANT/
🔗 https://Mahil27-ai-document-assistant.hf.space/docs
DocAI is built to help companies and individuals quickly extract insights from documents such as:
- 📑 Resume & CVs
- 🏥 Medical Reports
- 💰 Financial Statements
- 📃 Offer Letters & Contracts
- 📚 Any PDF/DOCX document
Upload → Ask Questions → Get Accurate Answers.
✅ Upload PDF/DOCX documents
✅ AI chatbot answers only from uploaded document
✅ RAG-based document search (No hallucination)
✅ Clean ChatGPT-style UI
✅ Shows active uploaded document name
✅ Fast embeddings + retrieval using FAISS
✅ Fully deployed online (Frontend + Backend)
🛠️ Tech Stack 🎨 Frontend
HTML5
CSS3
JavaScript (Fetch API)
⚡ Backend
FastAPI
Uvicorn
PyPDF2
python-docx
Sentence Transformers
FAISS Vector Search
🌍 Deployment
GitHub Pages → Frontend Hosting
Hugging Face Spaces → Backend Hosting (Docker)
🔥 API Endpoints Method Endpoint Description POST /upload Upload + Index Document POST /chat Ask Questions from Document GET /docs Swagger API Documentation 🧑💻 Run Locally (Optional) 1️⃣ Backend Setup cd backend pip install -r requirements.txt uvicorn app.main:app --reload
Backend will start at:
2️⃣ Frontend Setup
Open directly:
frontend/index.html
Or use VS Code Live Server.
🌍 Deployment Guide ✅ Deploy Frontend on GitHub Pages
Push your code to GitHub
Go to:
Repo → Settings → Pages
Select:
Branch: main
Folder: /root
Save → Website becomes live.
✅ Deploy Backend on Hugging Face Spaces
Create a Docker Space
Upload backend code + Dockerfile
Push:
git push hf main
Backend will run at:
https://-.hf.space
GitHub Pages never sleeps
Hugging Face backend may sleep in free tier
Use monitoring tools like UptimeRobot to keep backend awake
Document Upload
↓
Text Extraction (PDF/DOCX)
↓
Chunking + Embeddings
↓
FAISS Vector Index
↓
User Question
↓
Relevant Context Retrieval
↓
LLM Answer Generation (Grounded Response)
👨💻 Author
Mahil
AI / ML Developer
Project: DocAI — AI Document Assistant