Spaces:
Running
Running
File size: 1,987 Bytes
2e9afea | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | ---
title: MANIT Chat RAG
emoji: ๐
colorFrom: blue
colorTo: indigo
sdk: docker
app_port: 7860
pinned: false
---
# MANIT Chat RAG
An AI-powered academic assistant for Maulana Azad National Institute of Technology (MANIT), Bhopal, built with a Retrieval-Augmented Generation (RAG) pipeline. It uses FastAPI for the API backend and serves a minimalist, modern, static HTML/JS/CSS web interface.
This project is configured for single-container Docker deployment, making it ready to be hosted directly on **Hugging Face Spaces** as a Docker Space.
## ๐ How to Run Locally with Docker
1. Ensure your Groq API key is set in `server/.env`:
```env
groq_api_key=your_groq_api_key_here
```
2. Build the unified Docker image:
```bash
docker build -t manit-chat .
```
3. Run the container, mounting the data volume and passing the environment file:
```bash
docker run -p 7860:7860 --env-file server/.env -v "$(pwd)/server/data:/app/server/data" manit-chat
```
4. Open your web browser and navigate to `http://localhost:7860`.
---
## โ๏ธ How to Deploy to Hugging Face Spaces
1. Create a new Space on [Hugging Face](https://huggingface.co/new-space).
2. Give it a name and select **Docker** as the SDK.
3. Choose **Blank** (default template) as the starting point.
4. Clone your Space repository locally, or add it as a Git remote in this project folder:
```bash
git init
git add .
git commit -m "Configure for Hugging Face Spaces"
git remote add origin https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME
git push -u origin main --force
```
5. Once pushed, go to the **Settings** tab of your Hugging Face Space page:
* Scroll down to **Variables and secrets**.
* Click **New secret**.
* Set the **Name** to `groq_api_key`.
* Set the **Value** to your Groq API key (`gsk_...`).
6. Hugging Face will automatically detect the root `Dockerfile` and build it. Once complete, your Space will be active and running online!
|