yetessam commited on
Commit
06e3381
·
verified ·
1 Parent(s): 6205e88

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -22,11 +22,11 @@ from Gradio_UI import GradioUI
22
  endpoint_uri = load_huggingface_model()
23
 
24
  # Test the endpoint
25
- response = check_public_endpoint(endpoint_uri)
26
 
27
- if response.status is False:
28
- create_failed_gradio_ui()
29
 
 
 
30
  else:
31
 
32
  model = HfApiModel(
@@ -54,6 +54,6 @@ else:
54
 
55
  )
56
 
57
-
58
  GradioUI(agent).launch()
59
 
 
22
  endpoint_uri = load_huggingface_model()
23
 
24
  # Test the endpoint
 
25
 
26
+ status_info = check_public_endpoint(endpoint_uri)
 
27
 
28
+ if status_info["status"] is False:
29
+ create_failed_gradio_ui()
30
  else:
31
 
32
  model = HfApiModel(
 
54
 
55
  )
56
 
57
+ # Launch the UI earlier or without passing through the Agent
58
  GradioUI(agent).launch()
59