Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -15,15 +15,14 @@ from agents.prompts import load_prompts
|
|
15 |
|
16 |
from Gradio_UI import GradioUI
|
17 |
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
|
22 |
# Test the endpoint
|
23 |
|
24 |
-
if not is_huggingface_endpoint(
|
25 |
create_failed_gradio_ui()
|
26 |
-
|
27 |
else:
|
28 |
pass
|
29 |
|
@@ -33,7 +32,7 @@ else:
|
|
33 |
model = HfApiModel(
|
34 |
max_tokens=2096,
|
35 |
temperature=0.5,
|
36 |
-
model_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 |
|