Spaces:
Sleeping
Sleeping
Update checks/failed_check.py
Browse files- checks/failed_check.py +3 -3
checks/failed_check.py
CHANGED
@@ -13,7 +13,7 @@ def check_app_status():
|
|
13 |
"The endpoint is starting up. It might take a few minutes...",
|
14 |
"Payment is needed for inferences. Please complete payment to continue.",
|
15 |
"The endpoint is scaled to zero due to inactivity. Starting it now...",
|
16 |
-
|
17 |
]
|
18 |
|
19 |
# Simulate a real condition check (for demonstration, we randomly select one status)
|
@@ -25,7 +25,7 @@ def check_app_status():
|
|
25 |
|
26 |
# Simulate some delay for other operations (like checking the status)
|
27 |
time.sleep(2)
|
28 |
-
|
29 |
return current_status
|
30 |
|
31 |
|
@@ -43,7 +43,7 @@ def create_failed_gradio_ui():
|
|
43 |
outputs="text", # Output will be a simple text message
|
44 |
live=True, # Updates automatically when clicked
|
45 |
title="App Status Dashboard", # Title of the Gradio UI
|
46 |
-
description="This Gradio UI displays the current status of the app. It
|
47 |
)
|
48 |
|
49 |
# Launch the UI
|
|
|
13 |
"The endpoint is starting up. It might take a few minutes...",
|
14 |
"Payment is needed for inferences. Please complete payment to continue.",
|
15 |
"The endpoint is scaled to zero due to inactivity. Starting it now...",
|
16 |
+
|
17 |
]
|
18 |
|
19 |
# Simulate a real condition check (for demonstration, we randomly select one status)
|
|
|
25 |
|
26 |
# Simulate some delay for other operations (like checking the status)
|
27 |
time.sleep(2)
|
28 |
+
return "App start up failure, please check back in a day or two"
|
29 |
return current_status
|
30 |
|
31 |
|
|
|
43 |
outputs="text", # Output will be a simple text message
|
44 |
live=True, # Updates automatically when clicked
|
45 |
title="App Status Dashboard", # Title of the Gradio UI
|
46 |
+
description="This Gradio UI displays the current status of the app. It is only shown when one of the pre-check routines has failed. At this point, there are various reasons why the app might not be working, including endpoint scaling or payment issues.",
|
47 |
)
|
48 |
|
49 |
# Launch the UI
|