Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
|
|
3 |
import sys # Add this import to fix the error
|
4 |
import datetime
|
5 |
import requests
|
|
|
6 |
|
7 |
import os
|
8 |
import pytz # Had to give it permission in Code agent
|
@@ -20,11 +21,12 @@ my_id = os.getenv("QWEN_URI")
|
|
20 |
|
21 |
# Test the endpoint
|
22 |
|
23 |
-
if is_huggingface_endpoint(my_id):
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
28 |
|
29 |
|
30 |
'''
|
|
|
3 |
import sys # Add this import to fix the error
|
4 |
import datetime
|
5 |
import requests
|
6 |
+
from checks.failed_check import create_failed_gradio_ui
|
7 |
|
8 |
import os
|
9 |
import pytz # Had to give it permission in Code agent
|
|
|
21 |
|
22 |
# Test the endpoint
|
23 |
|
24 |
+
if not is_huggingface_endpoint(my_id):
|
25 |
+
create_failed_gradio_ui()
|
26 |
+
# Stop execution if the endpoint is not valid
|
27 |
+
else:
|
28 |
+
pass
|
29 |
+
|
30 |
|
31 |
|
32 |
'''
|