Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -128,14 +128,17 @@ demo = gr.Interface(
|
|
| 128 |
|
| 129 |
if __name__ == "__main__":
|
| 130 |
print("Starting Gradio server...")
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
|
|
|
|
|
|
|
|
|
| 139 |
except Exception as e:
|
| 140 |
print(f"Launch failed: {str(e)}")
|
| 141 |
raise
|
|
|
|
| 128 |
|
| 129 |
if __name__ == "__main__":
|
| 130 |
print("Starting Gradio server...")
|
| 131 |
+
import time
|
| 132 |
+
time.sleep(15) # Give extra time for model/Gradio to settle
|
| 133 |
+
|
| 134 |
+
demo.launch(
|
| 135 |
+
server_name="0.0.0.0",
|
| 136 |
+
server_port=7860,
|
| 137 |
+
debug=False,
|
| 138 |
+
quiet=False,
|
| 139 |
+
show_error=True,
|
| 140 |
+
prevent_thread_lock=True # Helps in containers
|
| 141 |
+
)
|
| 142 |
except Exception as e:
|
| 143 |
print(f"Launch failed: {str(e)}")
|
| 144 |
raise
|