yetessam commited on
Commit
95c49b7
·
verified ·
1 Parent(s): 0f61d7b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -15,15 +15,14 @@ from agents.prompts import load_prompts
15
 
16
  from Gradio_UI import GradioUI
17
 
18
-
19
- my_id = os.getenv("QWEN_URI")
20
-
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
 
@@ -33,7 +32,7 @@ else:
33
  model = HfApiModel(
34
  max_tokens=2096,
35
  temperature=0.5,
36
- model_id= my_id,
37
  custom_role_conversions=None,
38
  )
39
 
 
15
 
16
  from Gradio_UI import GradioUI
17
 
18
+ # Get the URI for the endpoint
19
+ endpoint_uri = load_huggingface_model
 
20
 
21
  # Test the endpoint
22
 
23
+ if not is_huggingface_endpoint(endpoint_uri):
24
  create_failed_gradio_ui()
25
+
26
  else:
27
  pass
28
 
 
32
  model = HfApiModel(
33
  max_tokens=2096,
34
  temperature=0.5,
35
+ model_id= endpoint_uri,
36
  custom_role_conversions=None,
37
  )
38