Spaces:
Sleeping
Sleeping
Download app.py from Taf2023/Universal-Media-Downloader: direct link, hf CLI and curl.
- Browser
- Download file 614 Bytes
-
https://huggingface.co/spaces/Taf2023/Universal-Media-Downloader/resolve/main/app.py
- Command line
-
hf download hf://spaces/Taf2023/Universal-Media-Downloader/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Taf2023/Universal-Media-Downloader/resolve/main/app.py
614 Bytes
| #!/usr/bin/env python3 | |
| """ | |
| Entry point for Hugging Face Spaces deployment | |
| """ | |
| import os | |
| import sys | |
| # Add current directory to Python path | |
| sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) | |
| # Import and run the backend | |
| from backend import app, ytdlp_manager | |
| if __name__ == '__main__': | |
| port = int(os.environ.get('PORT', 7860)) | |
| debug = os.environ.get('DEBUG', 'False').lower() == 'true' | |
| print(f"Starting Universal Media Downloader on port {port}") | |
| print(f"Debug mode: {debug}") | |
| print(f"yt-dlp version: {ytdlp_manager}") | |
| app.run(host='0.0.0.0', port=port, debug=debug) |