Spaces:
Sleeping
Sleeping
File size: 6,832 Bytes
1fe9360 |
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 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
# π HuggingFace Spaces Submission Guide
## Pre-Submission Checklist
Before submitting, verify:
- β
`README.md` has proper YAML front matter with tags
- β
`requirements.txt` includes all dependencies
- β
`packages.txt` includes `ffmpeg`
- β
`app.py` is the main entry point
- β
All Python files are present (`app.py`, `localizer_engine.py`, `server.py`)
- β
Code works locally without errors
- β
No hardcoded API keys in code
## Step 1: Prepare Your Repository
### Option A: If you haven't initialized Git yet
```bash
cd /Users/osamamoftah/Desktop/MCP-Video-Localizer
# Initialize git repository
git init
# Add all files
git add .
# Create initial commit
git commit -m "Initial commit: Global Video Localizer for MCP Hackathon"
```
### Option B: If Git is already initialized
```bash
cd /Users/osamamoftah/Desktop/MCP-Video-Localizer
# Check status
git status
# Add any new/modified files
git add .
# Commit changes
git commit -m "Ready for HuggingFace Spaces submission"
```
## Step 2: Create/Connect to HuggingFace Space
### If you already created the Space:
1. Go to your Space on HuggingFace: `https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME`
2. Click on **"Files and versions"** tab
3. Click **"Add file"** β **"Upload files"**
4. Upload all files:
- `app.py`
- `localizer_engine.py`
- `server.py`
- `requirements.txt`
- `packages.txt`
- `README.md`
### If you want to use Git (Recommended):
1. Go to your Space on HuggingFace
2. Click on **"Files and versions"** tab
3. Copy the **Git URL** (looks like: `https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME`)
Then in your terminal:
```bash
cd /Users/osamamoftah/Desktop/MCP-Video-Localizer
# Add HuggingFace remote (replace with your actual Space URL)
git remote add huggingface https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME
**Note**: If you get authentication errors, you may need to:
- Use a HuggingFace token: `git push https://USERNAME:TOKEN@huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME main`
- Or set up Git LFS if needed
## Step 3: Verify Space Configuration
1. Go to your Space settings
2. Verify:
- **SDK**: Gradio
- **SDK Version**: 4.44.0 (or latest compatible)
- **Hardware**: CPU (or GPU if you have credits)
- **Secrets**: Not needed (app works without API keys)
3. Check the **README.md** is rendering correctly with:
- Title: "Global Video Localizer"
- Emoji: π
- Tags: `mcp-in-action-track-consumer` and others
## Step 4: Test Your Space
1. Wait for the build to complete (usually 2-5 minutes)
2. Click **"App"** tab to open your app
3. Test with a short video:
- Upload a test video (10-30 seconds)
- Select a language (try Spanish first)
- Click "Localize Video"
- Verify it works without API key (should use EdgeTTS)
- Verify it works with API key (if you add one)
4. Check logs:
- Click **"Logs"** tab
- Look for any errors
- Verify dependencies installed correctly
## Step 5: Submit to Hackathon
### Find the Hackathon Page
1. Go to: https://huggingface.co/MCP-1st-Birthday
2. Or search for "MCP 1st Birthday Hackathon" on HuggingFace
### Submission Process
1. **Click "Submit Your Project"** or similar button
2. **Fill out the submission form**:
- **Space URL**: `https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME`
- **Track**: Select `mcp-in-action-track-consumer` (Consumer MCP Servers)
- **Title**: "Global Video Localizer"
- **Description**:
```
Automated video localization system that breaks language barriers.
Upload a video, select a language, get a professionally dubbed version in minutes.
Full MCP integration allows Claude to localize videos programmatically.
Works completely free with open source models.
```
- **Tags**: `mcp-in-action-track-consumer`, `video`, `translation`, `tts`, `whisper`, `elevenlabs`, `gradio`, `mcp`
- **Social Media Links**: (Optional) Your X/Twitter and LinkedIn posts
3. **Submit the form**
## Step 6: Post on Social Media (Required)
According to hackathon rules, you need to post about your project:
### X (Twitter)
- Post about your app
- Tag: `@huggingface` and `@AnthropicAI`
- Use hashtag: `#MCPHackathon`
- Include link to your Space
### LinkedIn
- Post about your app
- Tag: `@Hugging Face` and `@Anthropic`
- Use hashtag: `#MCPHackathon`
- Include link to your Space
**Sample Posts** (see `SOCIAL_MEDIA_POSTS.md` if you saved it, or create new ones)
## Step 7: Verify Submission
1. Check your Space is public and accessible
2. Verify README displays correctly
3. Test the app works on HuggingFace infrastructure
4. Confirm your submission appears on the hackathon page
## Troubleshooting
### Build Fails
**Error**: `ModuleNotFoundError`
- **Fix**: Check `requirements.txt` has all dependencies
- Verify package names are correct
**Error**: `ffmpeg not found`
- **Fix**: Ensure `packages.txt` contains `ffmpeg`
**Error**: `Gradio version mismatch`
- **Fix**: Update `sdk_version` in README.md front matter to match your `requirements.txt`
### App Doesn't Work
**Video processing fails**:
- Check logs for specific errors
- Verify `moviepy` and `pydub` are installed
- Test with a smaller video first
**TTS not working**:
- Check logs for TTS errors
- Verify fallback system is working
- Test without API key first (should use EdgeTTS)
### Git Push Issues
**Authentication error**:
```bash
# Use HuggingFace token
git push https://YOUR_USERNAME:YOUR_TOKEN@huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME main
```
**Large files**:
- HuggingFace Spaces has file size limits
- Videos should be uploaded by users, not stored in repo
- If needed, use Git LFS for large files
## Final Checklist Before Submission
- [ ] Space builds successfully
- [ ] App runs without errors
- [ ] Works without API keys (open source models)
- [ ] Works with ElevenLabs API key (optional)
- [ ] README displays correctly
- [ ] All tags are correct in README
- [ ] Social media posts are published
- [ ] Hackathon submission form is filled
- [ ] Space is public and accessible
## Quick Command Reference
```bash
# Navigate to project
cd /Users/osamamoftah/Desktop/MCP-Video-Localizer
# Check git status
git status
# Add all files
git add .
# Commit
git commit -m "Ready for submission"
# Push to HuggingFace (replace with your Space URL)
git push https://YOUR_USERNAME:YOUR_TOKEN@huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME main
# Or if remote is set up
git push huggingface main
```
## Need Help?
- **HuggingFace Docs**: https://huggingface.co/docs/hub/spaces
- **Gradio Docs**: https://www.gradio.app/docs/
- **Hackathon Info**: https://huggingface.co/MCP-1st-Birthday
- **MCP Docs**: https://modelcontextprotocol.io/
---
**Good luck with your submission! π**
|