Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
from smolagents import CodeAgent, DuckDuckGoSearchTool,
|
| 2 |
import datetime
|
| 3 |
import requests
|
| 4 |
import pytz
|
|
@@ -307,10 +307,11 @@ def check_citation_status(citation_id: str) -> Dict:
|
|
| 307 |
final_answer = FinalAnswerTool()
|
| 308 |
|
| 309 |
#kateri model in kje se povežemo!
|
| 310 |
-
model =
|
| 311 |
max_tokens=2096,
|
| 312 |
-
temperature=0.3,
|
| 313 |
-
model_id=
|
|
|
|
| 314 |
custom_role_conversions=None,
|
| 315 |
)
|
| 316 |
|
|
@@ -331,5 +332,4 @@ agent = CodeAgent(
|
|
| 331 |
prompt_templates=prompt_templates
|
| 332 |
)
|
| 333 |
|
| 334 |
-
GradioUI(agent).launch() #launch za UI
|
| 335 |
-
|
|
|
|
| 1 |
+
from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel, load_tool, tool
|
| 2 |
import datetime
|
| 3 |
import requests
|
| 4 |
import pytz
|
|
|
|
| 307 |
final_answer = FinalAnswerTool()
|
| 308 |
|
| 309 |
#kateri model in kje se povežemo!
|
| 310 |
+
model = HfApiModel(
|
| 311 |
max_tokens=2096,
|
| 312 |
+
temperature=0.3,
|
| 313 |
+
#model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud/',
|
| 314 |
+
model_id="Qwen/Qwen1.5-7B-Chat",
|
| 315 |
custom_role_conversions=None,
|
| 316 |
)
|
| 317 |
|
|
|
|
| 332 |
prompt_templates=prompt_templates
|
| 333 |
)
|
| 334 |
|
| 335 |
+
GradioUI(agent).launch() #launch za UI
|
|
|