Spaces:
Sleeping
Sleeping
| # β‘ 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. | |