Spaces:
Build error
Build error
A newer version of the Gradio SDK is available: 6.19.0
metadata
title: Document Assistant
emoji: 📄
colorFrom: blue
colorTo: yellow
sdk: gradio
sdk_version: 5.4.0
python_version: '3.11'
app_file: app.py
pinned: false
Document Assistant (SPJIMR Branded)
A simple, document-aware chatbot built with Gradio, FAISS, and Hugging Face Inference API.
Features
- File Support: PDF, DOCX, TXT.
- RAG Engine: Uses
Sentence-Transformersfor embeddings andFAISSfor fast retrieval. - UI: Customized Gradio Blocks with SPJIMR branding (Deep Blue & Gold).
- LLM: Powered by Mistral-7B via Hugging Face Inference API.
Local Setup
- Clone this repository.
- Install dependencies:
pip install -r requirements.txt - Set your Hugging Face Token (required for LLM access):
- Windows (PowerShell):
$env:HF_TOKEN="your_token_here" - Linux/Mac:
export HF_TOKEN="your_token_here"
- Windows (PowerShell):
- Run the app:
python app.py
Deployment to Hugging Face Spaces
- Create a new Space on Hugging Face.
- Select Gradio as the SDK.
- Upload
app.pyandrequirements.txt. - Go to Settings > Variables and Secrets.
- Add a new Secret:
- Key:
HF_TOKEN - Value: Your Hugging Face User Access Token (from hf.co/settings/tokens).
- Key:
- The Space will build and deploy automatically!