Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
5.49.1
Deployment Instructions for Hugging Face Spaces
Prerequisites
- A Hugging Face account (free at https://huggingface.co/join)
- Git installed on your system
- Hugging Face CLI (optional but recommended)
Method 1: Deploy via Hugging Face Web Interface
Create a new Space:
- Go to https://huggingface.co/new-space
- Choose a name for your Space (e.g., "qwen-ocr-detection")
- Select "Gradio" as the SDK
- Choose "Public" or "Private" visibility
- Click "Create Space"
Upload files:
- Click "Files" tab in your new Space
- Upload these files from the
huggingface-spacefolder:app.pyrequirements.txtREADME.md
- Click "Commit changes to main"
Wait for deployment:
- The Space will automatically build and deploy
- Check the "App" tab to see your running application
Method 2: Deploy via Git Command Line
Install Hugging Face CLI (if not installed):
pip install huggingface_hubLogin to Hugging Face:
huggingface-cli loginEnter your Hugging Face token when prompted (get it from https://huggingface.co/settings/tokens)
Create a new Space:
# Replace YOUR_USERNAME with your Hugging Face username cd /Users/sangmin/Developer/Qwen2.5-VL/huggingface-space git init git add . git commit -m "Initial commit: Qwen OCR Text Detection app" # Create the Space repository huggingface-cli repo create qwen-ocr-detection --type space --space_sdk gradioPush to Hugging Face:
# Replace YOUR_USERNAME with your Hugging Face username git remote add origin https://huggingface.co/spaces/YOUR_USERNAME/qwen-ocr-detection git push -u origin main
Method 3: Manual Git Setup
Create a Space on Hugging Face website (follow Method 1, step 1)
Clone the empty Space repository:
# Replace YOUR_USERNAME with your Hugging Face username git clone https://huggingface.co/spaces/YOUR_USERNAME/qwen-ocr-detection cd qwen-ocr-detectionCopy files and push:
cp /Users/sangmin/Developer/Qwen2.5-VL/huggingface-space/* . git add . git commit -m "Add Qwen OCR Text Detection app" git push
After Deployment
Access your Space:
- URL will be:
https://huggingface.co/spaces/YOUR_USERNAME/qwen-ocr-detection - The app should be running and accessible
- URL will be:
Share your Space:
- You can share the direct URL with others
- Consider adding it to your Hugging Face profile
Update the Space:
- Make changes to your local files
- Commit and push changes:
git add . git commit -m "Update: description of changes" git push
Troubleshooting
- Build fails: Check the logs in the "Logs" tab of your Space
- App doesn't start: Verify requirements.txt has correct package versions
- API key issues: Users need their own Dashscope API key from Alibaba Cloud
Notes
- The app is configured to use the Dashscope API (Alibaba Cloud)
- Users will need to provide their own API key
- The free tier of Hugging Face Spaces should be sufficient for this app
- Consider adding example images if needed (place in the Space repository)