Taf2023's picture
Upload 8 files
c0a4ca6 verified
raw
history blame contribute delete
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)