backend / README.md
muhammadhasnain100's picture
Cursor
Remove Hub token from repo; use Space secret HF_TOKEN (HF push policy)
a77098c
|
Raw History Blame Contribute Delete
788 Bytes
metadata
title: Backend
emoji: 🤖
colorFrom: gray
colorTo: blue
sdk: docker
app_port: 7860

COMSATS Chatbot — FastAPI backend

Docker Space running FastAPI + Uvicorn on port 7860. Open /docs for Swagger.

Secrets (required for embedding downloads)

In the Space Settings → Variables and secrets, add a secret named HF_TOKEN with a Hub token from your tokens page (read access is enough). The app maps this to HUGGING_FACE_HUB_TOKEN at startup via space_credentials.py — no .env file in the repo.

First boot may take several minutes: dependencies install, the BGE embedding model downloads, and the FAISS index is built from the bundled CSV files (nothing under faiss_kb/*.faiss is committed).