Spaces:
Sleeping
Sleeping
cyberosa
commited on
Commit
·
95d010b
1
Parent(s):
eb433bb
chaning to InferenceClientModel
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
from smolagents import CodeAgent,
|
| 2 |
import datetime
|
| 3 |
import requests
|
| 4 |
import pytz
|
|
@@ -31,11 +31,12 @@ calories_checker = CaloriesCheckerTool()
|
|
| 31 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
| 32 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
| 33 |
|
| 34 |
-
model =
|
| 35 |
-
max_tokens=
|
| 36 |
temperature=0.5,
|
| 37 |
model_id="Qwen/Qwen2.5-Coder-32B-Instruct", # it is possible that this model may be overloaded
|
| 38 |
custom_role_conversions=None,
|
|
|
|
| 39 |
)
|
| 40 |
|
| 41 |
|
|
|
|
| 1 |
+
from smolagents import CodeAgent, load_tool, tool, InferenceClientModel
|
| 2 |
import datetime
|
| 3 |
import requests
|
| 4 |
import pytz
|
|
|
|
| 31 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
| 32 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
| 33 |
|
| 34 |
+
model = InferenceClientModel(
|
| 35 |
+
max_tokens=2048,
|
| 36 |
temperature=0.5,
|
| 37 |
model_id="Qwen/Qwen2.5-Coder-32B-Instruct", # it is possible that this model may be overloaded
|
| 38 |
custom_role_conversions=None,
|
| 39 |
+
inference_client_url="https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud",
|
| 40 |
)
|
| 41 |
|
| 42 |
|