LukeMattingly
commited on
Commit
·
c2dffcc
1
Parent(s):
ed95b63
reverted model back added in login for local model running
Browse files
app.py
CHANGED
@@ -7,6 +7,8 @@ from tools.final_answer import FinalAnswerTool
|
|
7 |
import re
|
8 |
import ast
|
9 |
from typing import List
|
|
|
|
|
10 |
|
11 |
|
12 |
from Gradio_UI import GradioUI
|
@@ -310,10 +312,14 @@ final_answer = FinalAnswerTool()
|
|
310 |
# 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:
|
311 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
312 |
|
|
|
|
|
|
|
|
|
313 |
model = HfApiModel(
|
314 |
max_tokens=2096,
|
315 |
temperature=0.5,
|
316 |
-
model_id='
|
317 |
custom_role_conversions=None,
|
318 |
)
|
319 |
|
|
|
7 |
import re
|
8 |
import ast
|
9 |
from typing import List
|
10 |
+
from huggingface_hub import login
|
11 |
+
import os
|
12 |
|
13 |
|
14 |
from Gradio_UI import GradioUI
|
|
|
312 |
# 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:
|
313 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
314 |
|
315 |
+
hf_token = os.getenv("HF_TOKEN")
|
316 |
+
if hf_token:
|
317 |
+
login(token=hf_token)
|
318 |
+
|
319 |
model = HfApiModel(
|
320 |
max_tokens=2096,
|
321 |
temperature=0.5,
|
322 |
+
model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded deepseek-ai/DeepSeek-R1-Distill-Qwen-32B || Qwen/Qwen2.5-Coder-32B-Instruct
|
323 |
custom_role_conversions=None,
|
324 |
)
|
325 |
|