Frog215 commited on
Commit
e9dd3ef
·
verified ·
1 Parent(s): 64de4da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -1,4 +1,4 @@
1
- from smolagents import CodeAgent, DuckDuckGoSearchTool, InferenceClientModel, load_tool, tool
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 = InferenceClientModel(
311
  max_tokens=2096,
312
- temperature=0.3,
313
- model_id="https://your-custom-endpoint.aws.endpoints.huggingface.cloud",
 
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