File size: 788 Bytes
8d0f743
8299bad
 
 
 
8d0f743
8299bad
8d0f743
 
8299bad
 
 
a77098c
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
---
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](https://huggingface.co/settings/tokens) (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).