sammoftah/Video-localizer
0
1# ๐ HuggingFace Spaces Submission Guide2 3## Pre-Submission Checklist4 5Before submitting, verify:6 7- โ
`README.md` has proper YAML front matter with tags8- โ
`requirements.txt` includes all dependencies9- โ
`packages.txt` includes `ffmpeg`10- โ
`app.py` is the main entry point11- โ
All Python files are present (`app.py`, `localizer_engine.py`, `server.py`)12- โ
Code works locally without errors13- โ
No hardcoded API keys in code14 15## Step 1: Prepare Your Repository16 17### Option A: If you haven't initialized Git yet18 19```bash20cd /Users/osamamoftah/Desktop/MCP-Video-Localizer21 22# Initialize git repository23git init24 25# Add all files26git add .27 28# Create initial commit29git commit -m "Initial commit: Global Video Localizer for MCP Hackathon"30```31 32### Option B: If Git is already initialized33 34```bash35cd /Users/osamamoftah/Desktop/MCP-Video-Localizer36 37# Check status38git status39 40# Add any new/modified files41git add .42 43# Commit changes44git commit -m "Ready for HuggingFace Spaces submission"45```46 47## Step 2: Create/Connect to HuggingFace Space48 49### If you already created the Space:50 511. Go to your Space on HuggingFace: `https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME`522. Click on **"Files and versions"** tab533. Click **"Add file"** โ **"Upload files"**544. Upload all files:55 - `app.py`56 - `localizer_engine.py`57 - `server.py`58 - `requirements.txt`59 - `packages.txt`60 - `README.md`61 62### If you want to use Git (Recommended):63 641. Go to your Space on HuggingFace652. Click on **"Files and versions"** tab663. Copy the **Git URL** (looks like: `https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME`)67 68Then in your terminal:69 70```bash71cd /Users/osamamoftah/Desktop/MCP-Video-Localizer72 73# Add HuggingFace remote (replace with your actual Space URL)74git remote add huggingface https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME75 76**Note**: If you get authentication errors, you may need to:77- Use a HuggingFace token: `git push https://USERNAME:TOKEN@huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME main`78- Or set up Git LFS if needed79 80## Step 3: Verify Space Configuration81 821. Go to your Space settings832. Verify:84 - **SDK**: Gradio85 - **SDK Version**: 4.44.0 (or latest compatible)86 - **Hardware**: CPU (or GPU if you have credits)87 - **Secrets**: Not needed (app works without API keys)88 893. Check the **README.md** is rendering correctly with:90 - Title: "Global Video Localizer"91 - Emoji: ๐92 - Tags: `mcp-in-action-track-consumer` and others93 94## Step 4: Test Your Space95 961. Wait for the build to complete (usually 2-5 minutes)972. Click **"App"** tab to open your app983. Test with a short video:99 - Upload a test video (10-30 seconds)100 - Select a language (try Spanish first)101 - Click "Localize Video"102 - Verify it works without API key (should use EdgeTTS)103 - Verify it works with API key (if you add one)104 1054. Check logs:106 - Click **"Logs"** tab107 - Look for any errors108 - Verify dependencies installed correctly109 110## Step 5: Submit to Hackathon111 112### Find the Hackathon Page113 1141. Go to: https://huggingface.co/MCP-1st-Birthday1152. Or search for "MCP 1st Birthday Hackathon" on HuggingFace116 117### Submission Process118 1191. **Click "Submit Your Project"** or similar button1202. **Fill out the submission form**:121 - **Space URL**: `https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME`122 - **Track**: Select `mcp-in-action-track-consumer` (Consumer MCP Servers)123 - **Title**: "Global Video Localizer"124 - **Description**: 125 ```126 Automated video localization system that breaks language barriers. 127 Upload a video, select a language, get a professionally dubbed version in minutes.128 Full MCP integration allows Claude to localize videos programmatically.129 Works completely free with open source models.130 ```131 - **Tags**: `mcp-in-action-track-consumer`, `video`, `translation`, `tts`, `whisper`, `elevenlabs`, `gradio`, `mcp`132 - **Social Media Links**: (Optional) Your X/Twitter and LinkedIn posts133 1343. **Submit the form**135 136## Step 6: Post on Social Media (Required)137 138According to hackathon rules, you need to post about your project:139 140### X (Twitter)141- Post about your app142- Tag: `@huggingface` and `@AnthropicAI`143- Use hashtag: `#MCPHackathon`144- Include link to your Space145 146### LinkedIn147- Post about your app148- Tag: `@Hugging Face` and `@Anthropic`149- Use hashtag: `#MCPHackathon`150- Include link to your Space151 152**Sample Posts** (see `SOCIAL_MEDIA_POSTS.md` if you saved it, or create new ones)153 154## Step 7: Verify Submission155 1561. Check your Space is public and accessible1572. Verify README displays correctly1583. Test the app works on HuggingFace infrastructure1594. Confirm your submission appears on the hackathon page160 161## Troubleshooting162 163### Build Fails164 165**Error**: `ModuleNotFoundError`166- **Fix**: Check `requirements.txt` has all dependencies167- Verify package names are correct168 169**Error**: `ffmpeg not found`170- **Fix**: Ensure `packages.txt` contains `ffmpeg`171 172**Error**: `Gradio version mismatch`173- **Fix**: Update `sdk_version` in README.md front matter to match your `requirements.txt`174 175### App Doesn't Work176 177**Video processing fails**:178- Check logs for specific errors179- Verify `moviepy` and `pydub` are installed180- Test with a smaller video first181 182**TTS not working**:183- Check logs for TTS errors184- Verify fallback system is working185- Test without API key first (should use EdgeTTS)186 187### Git Push Issues188 189**Authentication error**:190```bash191# Use HuggingFace token192git push https://YOUR_USERNAME:YOUR_TOKEN@huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME main193```194 195**Large files**:196- HuggingFace Spaces has file size limits197- Videos should be uploaded by users, not stored in repo198- If needed, use Git LFS for large files199 200## Final Checklist Before Submission201 202- [ ] Space builds successfully203- [ ] App runs without errors204- [ ] Works without API keys (open source models)205- [ ] Works with ElevenLabs API key (optional)206- [ ] README displays correctly207- [ ] All tags are correct in README208- [ ] Social media posts are published209- [ ] Hackathon submission form is filled210- [ ] Space is public and accessible211 212## Quick Command Reference213 214```bash215# Navigate to project216cd /Users/osamamoftah/Desktop/MCP-Video-Localizer217 218# Check git status219git status220 221# Add all files222git add .223 224# Commit225git commit -m "Ready for submission"226 227# Push to HuggingFace (replace with your Space URL)228git push https://YOUR_USERNAME:YOUR_TOKEN@huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME main229 230# Or if remote is set up231git push huggingface main232```233 234## Need Help?235 236- **HuggingFace Docs**: https://huggingface.co/docs/hub/spaces237- **Gradio Docs**: https://www.gradio.app/docs/238- **Hackathon Info**: https://huggingface.co/MCP-1st-Birthday239- **MCP Docs**: https://modelcontextprotocol.io/240 241---242 243**Good luck with your submission! ๐**244 245 