Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,6 +4,8 @@ import requests
|
|
| 4 |
import pytz
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
|
|
|
|
|
|
| 7 |
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
|
@@ -68,11 +70,10 @@ final_answer = FinalAnswerTool()
|
|
| 68 |
# 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:
|
| 69 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
| 70 |
|
| 71 |
-
model =
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
custom_role_conversions=None,
|
| 76 |
)
|
| 77 |
|
| 78 |
|
|
|
|
| 4 |
import pytz
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
+
from smolagents import LiteLLMModel
|
| 8 |
+
|
| 9 |
|
| 10 |
from Gradio_UI import GradioUI
|
| 11 |
|
|
|
|
| 70 |
# 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:
|
| 71 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
| 72 |
|
| 73 |
+
model = LiteLLMModel(
|
| 74 |
+
model_id="qwen2:7b", # Ollama strips "ollama_chat/"
|
| 75 |
+
api_base="http://127.0.0.1:11434",
|
| 76 |
+
num_ctx=8192,
|
|
|
|
| 77 |
)
|
| 78 |
|
| 79 |
|