Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -85,13 +85,14 @@ def main():
|
|
85 |
# Wake it up before health check
|
86 |
wake_up_successful = wake_up_endpoint(endpoint_uri)
|
87 |
if not wake_up_successful:
|
88 |
-
print("Warning: Could not wake up the endpoint.
|
|
|
89 |
|
90 |
is_healthy, status_info = check_model_endpoint(endpoint_uri) # Test the endpoint
|
91 |
|
92 |
if not is_healthy:
|
93 |
interface = create_failed_gradio_ui(status_info)
|
94 |
-
interface.launch(show_error=True)
|
95 |
return
|
96 |
|
97 |
# Initialize and run the agent
|
|
|
85 |
# Wake it up before health check
|
86 |
wake_up_successful = wake_up_endpoint(endpoint_uri)
|
87 |
if not wake_up_successful:
|
88 |
+
print("Warning: Could not wake up the endpoint. Exiting.")
|
89 |
+
exit(0)
|
90 |
|
91 |
is_healthy, status_info = check_model_endpoint(endpoint_uri) # Test the endpoint
|
92 |
|
93 |
if not is_healthy:
|
94 |
interface = create_failed_gradio_ui(status_info)
|
95 |
+
interface.launch(show_error=True, share=True)
|
96 |
return
|
97 |
|
98 |
# Initialize and run the agent
|