Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,10 @@ import sympy as sp
|
|
10 |
from sympy.core.expr import Expr
|
11 |
|
12 |
from Gradio_UI import GradioUI
|
|
|
|
|
|
|
|
|
13 |
|
14 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
15 |
@tool
|
@@ -89,11 +93,12 @@ final_answer = FinalAnswerTool()
|
|
89 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
90 |
|
91 |
model = HfApiModel(
|
92 |
-
max_tokens=2096,
|
93 |
-
temperature=0.5,
|
94 |
-
model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
95 |
-
# model_id='Qwen/Qwen2.5-Coder-14B-Instruct',
|
96 |
-
custom_role_conversions=None,
|
|
|
97 |
)
|
98 |
|
99 |
|
|
|
10 |
from sympy.core.expr import Expr
|
11 |
|
12 |
from Gradio_UI import GradioUI
|
13 |
+
import os
|
14 |
+
|
15 |
+
# Retrieve HF secret from environment variables
|
16 |
+
hf_token = os.environ.get("HF_TOKEN")
|
17 |
|
18 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
19 |
@tool
|
|
|
93 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
94 |
|
95 |
model = HfApiModel(
|
96 |
+
max_tokens=2096,
|
97 |
+
temperature=0.5,
|
98 |
+
model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
99 |
+
# model_id='Qwen/Qwen2.5-Coder-14B-Instruct',
|
100 |
+
custom_role_conversions=None,
|
101 |
+
api_key=hf_token,
|
102 |
)
|
103 |
|
104 |
|