File size: 1,599 Bytes
3ec62b4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# ⚑ Quick Start: Get Permanent Link in 2 Minutes

## 🎯 **Fastest Way: Hugging Face Spaces**

```bash
# 1. Install CLI (if not already installed)
pip install huggingface_hub

# 2. Login (one-time, get token from https://huggingface.co/settings/tokens)
huggingface-cli login

# 3. Deploy!
cd /home/ubuntu/Yuxiang/tensorflow-radintel-ai/micro_apps/media_optimization
gradio deploy

# 4. Your permanent link will be shown:
# https://huggingface.co/spaces/your-username/media-optimization-ai
```

**That's it! Your app is now live with a permanent URL.** πŸŽ‰

---

## πŸ”„ **Update Your App Later**

```bash
# Make changes to gradio_demo.py, then:
gradio deploy --update
```

---

## πŸ“ **Add Secrets (After First Deploy)**

1. Go to your Space: https://huggingface.co/spaces/your-username/media-optimization-ai
2. Click **Settings** β†’ **Repository secrets**
3. Add your environment variables:
   - `AWS_ACCESS_KEY_ID`
   - `AWS_SECRET_ACCESS_KEY`
   - `MYSQL_HOST`
   - `MYSQL_USER`
   - `MYSQL_PASSWORD`
   - `MYSQL_DATABASE`
   - Any other secrets your app needs

---

## 🎯 **Alternative: Modal Deploy (if already using Modal)**

```bash
# 1. Configure secrets
modal secret create media-optimization-secrets \
  AWS_ACCESS_KEY_ID=xxx \
  AWS_SECRET_ACCESS_KEY=xxx \
  MYSQL_HOST=xxx \
  MYSQL_USER=xxx \
  MYSQL_PASSWORD=xxx \
  MYSQL_DATABASE=xxx

# 2. Deploy
modal deploy gradio_modal_deploy.py

# Your permanent URL: https://your-workspace--media-optimization-gradio-web.modal.run
```

---

## πŸ“š **Full Documentation**

See `DEPLOYMENT.md` for complete details and troubleshooting.