sofzcc's picture
Update README.md
eb4f1c5 verified
|
Raw History Blame Contribute Delete
1.4 kB
metadata
title: Self-Service KB Assistant
emoji: 📚
colorFrom: indigo
colorTo: blue
sdk: docker
app_port: 7860
pinned: false
short_description: RAG chat over your docs with source attribution

Self-Service KB Assistant

AI-powered knowledge base chat assistant. Upload documents, ask questions in plain language, get grounded answers with source attribution.

Stack

  • Backend: FastAPI + FLAN-T5 (seq2seq QA) + FAISS (vector search) + sentence-transformers
  • Frontend: Single HTML file — no framework, no build step
  • File support: .txt · .md · .pdf · .docx

Run locally

pip install -r requirements.txt
python app.py
# Open http://localhost:7860

Deploy on HuggingFace Spaces

  1. Create a new Space, SDK: Docker
  2. Upload all files (app.py, requirements.txt, static/, config.yaml, kb/, Dockerfile)
  3. Include this Dockerfile:
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 7860
CMD ["python", "app.py"]

Project structure

app.py              FastAPI backend + RAG pipeline
static/index.html   Complete UI (HTML/CSS/JS)
config.yaml         App configuration
requirements.txt    Python dependencies
Dockerfile          Container build for HF Spaces
kb/                 Your knowledge base documents
.cache/faiss/       Auto-generated vector index