Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -858,14 +858,15 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
858 |
|
859 |
if __name__ == "__main__":
|
860 |
try:
|
861 |
-
|
|
|
862 |
except Exception as e:
|
863 |
import traceback
|
864 |
print(f"Error launching demo: {traceback.format_exc()}")
|
865 |
print("\nTrying alternative launch method...")
|
866 |
try:
|
867 |
-
# Alternative launch method
|
868 |
-
demo.launch(share=False, debug=True)
|
869 |
except Exception as e2:
|
870 |
print(f"Alternative launch also failed: {str(e2)}")
|
871 |
print("\nPlease check your Gradio installation and try again.")
|
|
|
858 |
|
859 |
if __name__ == "__main__":
|
860 |
try:
|
861 |
+
# Disable autoreloading to prevent restart loops
|
862 |
+
demo.launch(prevent_thread_lock=True, autoreload=False)
|
863 |
except Exception as e:
|
864 |
import traceback
|
865 |
print(f"Error launching demo: {traceback.format_exc()}")
|
866 |
print("\nTrying alternative launch method...")
|
867 |
try:
|
868 |
+
# Alternative launch method also with autoreload disabled
|
869 |
+
demo.launch(share=False, debug=True, autoreload=False)
|
870 |
except Exception as e2:
|
871 |
print(f"Alternative launch also failed: {str(e2)}")
|
872 |
print("\nPlease check your Gradio installation and try again.")
|