Spaces:
Sleeping
Sleeping
| #!/usr/bin/env python3 | |
| """ | |
| HuggingFace Spaces deployment file | |
| This file is specifically for deploying to HuggingFace Spaces | |
| """ | |
| import os | |
| import sys | |
| print("Imports successful") | |
| # Add current directory to path | |
| sys.path.append('.') | |
| print("Path setup complete") | |
| # Test each import individually | |
| try: | |
| print("Testing web_ui import...") | |
| from web_ui import interface | |
| print("web_ui import successful") | |
| except Exception as e: | |
| print(f"web_ui import failed: {e}") | |
| import traceback | |
| traceback.print_exc() | |
| sys.exit(1) | |
| print("All imports successful, launching interface") | |
| # Launch the interface | |
| if __name__ == "__main__": | |
| try: | |
| print("Starting Gradio interface...") | |
| interface.launch( | |
| server_name="0.0.0.0", | |
| server_port=7860, | |
| share=False, | |
| show_error=True | |
| ) | |
| print("Interface launched successfully!") | |
| except Exception as e: | |
| print(f"Launch failed: {e}") | |
| import traceback | |
| traceback.print_exc() | |
| sys.exit(1) |