yetessam commited on
Commit
0f61d7b
·
verified ·
1 Parent(s): 091d271

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
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
- print("This is a Hugging Face Inference Endpoint.")
25
- else:
26
- print("This is NOT a Hugging Face Inference Endpoint.")
27
- sys.exit(1) # Stop execution if the endpoint is not valid
 
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
  '''