Chatbot / README.md
Prof-Hunter's picture
Upload 3 files
8ff1aa9 verified
|
Raw
History Blame Contribute Delete
1.61 kB

A newer version of the Gradio SDK is available: 6.19.0

Upgrade
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-Transformers for embeddings and FAISS for fast retrieval.
  • UI: Customized Gradio Blocks with SPJIMR branding (Deep Blue & Gold).
  • LLM: Powered by Mistral-7B via Hugging Face Inference API.

Local Setup

  1. Clone this repository.
  2. Install dependencies:
    pip install -r requirements.txt
    
  3. 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"
  4. Run the app:
    python app.py
    

Deployment to Hugging Face Spaces

  1. Create a new Space on Hugging Face.
  2. Select Gradio as the SDK.
  3. Upload app.py and requirements.txt.
  4. Go to Settings > Variables and Secrets.
  5. Add a new Secret:
  6. The Space will build and deploy automatically!

Built with