Media_Optimization / QUICKSTART.md
Daniel-IADAR's picture
Upload folder using huggingface_hub
3ec62b4 verified

A newer version of the Gradio SDK is available: 6.11.0

Upgrade

⚑ Quick Start: Get Permanent Link in 2 Minutes

🎯 Fastest Way: Hugging Face Spaces

# 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

# 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)

# 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.