File size: 894 Bytes
2c4ccb6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
422431d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# Backend (FastAPI)

## Structure
- `api.py` β€” Main FastAPI app
- `utils.py` β€” Helper functions
- `requirements.txt` β€” Python dependencies
- `.env.example` β€” Example environment variables

## Running Locally
```sh
pip install -r requirements.txt
uvicorn api:app --reload --host 0.0.0.0 --port 8000
```

## Deploying to Render
- Push this folder to a GitHub repo
- Use the following start command on Render:
  ```
  uvicorn api:app --host 0.0.0.0 --port 10000
  ```
- Add your environment variables in the Render dashboard

---

**Do not commit your real `.env` file! Use `.env.example` for reference.**

---

## Hugging Face Spaces Configuration

The following configuration is for deploying to Hugging Face Spaces:

```yaml
title: ChatDocxAI
emoji: πŸ“„
colorFrom: indigo
colorTo: blue
sdk: gradio
pinned: false
```

For a FastAPI backend with Gradio interface on Hugging Face Spaces.