sound-broken / crashtest.py
mitvho09's picture
Upload Space app
edb671a verified
Raw
History Blame Contribute Delete
749 Bytes
"""Minimal server to capture the actual crash."""
import os, sys, traceback
os.environ["SOUNDBROKEN_MOCK"] = "1"
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
sys.stderr = open(os.path.join(os.path.dirname(__file__), "stderr.log"), "w", encoding="utf-8")
try:
print("Step 1: importing...", flush=True)
import gradio as gr
print(f"Step 2: gradio {gr.__version__}", flush=True)
from app import demo
print("Step 3: app built", flush=True)
print("Step 4: launching...", flush=True)
demo.launch(server_port=7882, server_name="0.0.0.0", show_error=True)
print("Step 5: launched!", flush=True)
except Exception as e:
print(f"CRASHED: {e}", flush=True)
traceback.print_exc()
sys.stderr.flush()