-
Click: "Create new Space"
-
Fill in:
- Space name:
video-profanity-filter - SDK: Select Gradio
- Hardware: Select CPU basic (free tier)
- Visibility: Public
- Space name:
-
Click: "Create Space"
-
Upload files (drag and drop or use Git):
app.pygradio_app.pyclean.pyaudio_profanity_detector.pysubtitle_processor.pyvideo_cutter.pytimestamp_merger.pyprofanity_words.pyrequirements_hf.txt(rename torequirements.txtin the Space)README.md(optional)
-
Wait: Hugging Face will automatically build and deploy (5-10 minutes)
-
Done: Your app will be live at:
https://huggingface.co/spaces/YOUR_USERNAME/video-profanity-filter
If you want to connect your GitHub repo:
-
Push this repo to GitHub (already done)
-
In Hugging Face Space:
- Go to your Space settings
- Click "Repository" tab
- Click "Connect to GitHub"
- Select your repository:
adeel-raza/profanity-filter - Select branch:
main - Set root directory:
/(root) - Click "Connect"
-
Hugging Face will auto-deploy from GitHub
# Install Hugging Face CLI
pip install huggingface_hub
# Login
huggingface-cli login
# Create space
huggingface-cli repo create video-profanity-filter --type space --space-sdk gradio
# Clone the space
git clone https://huggingface.co/spaces/YOUR_USERNAME/video-profanity-filter
cd video-profanity-filter
# Copy files
cp ../movie_cleaner/app.py .
cp ../movie_cleaner/gradio_app.py .
cp ../movie_cleaner/clean.py .
cp ../movie_cleaner/audio_profanity_detector.py .
cp ../movie_cleaner/subtitle_processor.py .
cp ../movie_cleaner/video_cutter.py .
cp ../movie_cleaner/timestamp_merger.py .
cp ../movie_cleaner/profanity_words.py .
cp ../movie_cleaner/requirements_hf.txt requirements.txt
# Commit and push
git add .
git commit -m "Initial deployment"
git pushMake sure these files are in your Space:
-
app.py(required entry point) -
gradio_app.py(Gradio interface) -
clean.py(main script) -
audio_profanity_detector.py -
subtitle_processor.py -
video_cutter.py -
timestamp_merger.py -
profanity_words.py -
requirements.txt(from requirements_hf.txt)
Build fails?
- Check that
requirements.txtexists (notrequirements_hf.txt) - Ensure
app.pyis in the root directory - Check build logs in Space settings
App crashes?
- Check logs in Space settings
- Verify FFmpeg is available (should be pre-installed)
- Ensure all Python files are uploaded
Slow processing?
- Use
tinyWhisper model - Consider upgrading to paid tier for better performance