BenjaminKaindu0506 commited on
Commit
1b77204
·
verified ·
1 Parent(s): f5be765

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -3,7 +3,7 @@ import gradio as gr
3
  import requests
4
  import inspect
5
  import pandas as pd
6
- from smolagents import CodeAgent, OpenAIServerModel, DuckDuckGoSearchTool,Tool,tool,PythonInterpreterTool,VisitWebpageTool,FinalAnswerTool
7
 
8
 
9
  # (Keep Constants as is)
@@ -111,11 +111,7 @@ class BasicAgent:
111
  read_spreadsheet,
112
  get_youtube_transcript,
113
  ],
114
- model= OpenAIServerModel(
115
- model_id="cohere/north-mini-code:free",
116
- api_base="https://openrouter.ai/api/v1",
117
- api_key=os.environ["OPENROUTER_API_KEY"],
118
- ) ,
119
  #additional_authorized_imports=["pandas", "requests", "re"],
120
  #instructions = "If the question includes a task_id and mentions a file, call fetch_task_file first; route YouTube URLs to get_youtube_transcript, other URLs to visit_webpage, PDFs to pdf_tool, and spreadsheets to read_spreadsheet, using web_search only when no URL or file is given,then respond with only the exact final answer value, no explanation, no prefix.",
121
  max_steps=20,
 
3
  import requests
4
  import inspect
5
  import pandas as pd
6
+ from smolagents import CodeAgent, InferenceClientModel, DuckDuckGoSearchTool,Tool,tool,PythonInterpreterTool,VisitWebpageTool,FinalAnswerTool
7
 
8
 
9
  # (Keep Constants as is)
 
111
  read_spreadsheet,
112
  get_youtube_transcript,
113
  ],
114
+ model= InferenceClientModel("Qwen/Qwen2.5-Coder-32B-Instruct") ,
 
 
 
 
115
  #additional_authorized_imports=["pandas", "requests", "re"],
116
  #instructions = "If the question includes a task_id and mentions a file, call fetch_task_file first; route YouTube URLs to get_youtube_transcript, other URLs to visit_webpage, PDFs to pdf_tool, and spreadsheets to read_spreadsheet, using web_search only when no URL or file is given,then respond with only the exact final answer value, no explanation, no prefix.",
117
  max_steps=20,