Spaces:
Sleeping
Sleeping
File size: 1,037 Bytes
19949cf 779c0e4 19949cf 779c0e4 19949cf 84690e9 74c6c74 779c0e4 84690e9 74c6c74 779c0e4 84690e9 779c0e4 84690e9 779c0e4 84690e9 779c0e4 84690e9 779c0e4 19949cf 779c0e4 84690e9 779c0e4 b7a6217 779c0e4 84690e9 779c0e4 84690e9 779c0e4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | #!/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) |