jcleee commited on
Commit
a8e10cf
·
verified ·
1 Parent(s): f895639

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -7,7 +7,7 @@ from typing import List
7
 
8
  from langchain.text_splitter import CharacterTextSplitter
9
  from tools.final_answer import FinalAnswerTool
10
- from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel, load_tool, tool
11
  from Gradio_UI import GradioUI
12
 
13
  # === TOOLS ===
@@ -72,12 +72,11 @@ model_config = agent_config["model"]["data"]
72
  # === BUILD MODEL ===
73
  from smolagents import HfApiModel
74
 
75
- model = HfApiModel(
76
- model_id="google/gemma-2b-it",
77
- token=os.getenv("HF_TOKEN"),
78
  temperature=0.5,
79
  max_tokens=1024,
80
- custom_role_conversions=None,
81
  )
82
 
83
  model.last_input_token_count = 0
 
7
 
8
  from langchain.text_splitter import CharacterTextSplitter
9
  from tools.final_answer import FinalAnswerTool
10
+ from smolagents import CodeAgent, LiteLLMModel, DuckDuckGoSearchTool, HfApiModel, load_tool, tool
11
  from Gradio_UI import GradioUI
12
 
13
  # === TOOLS ===
 
72
  # === BUILD MODEL ===
73
  from smolagents import HfApiModel
74
 
75
+ model = LiteLLMModel(
76
+ model_id="gemini/gemini-2.0-flash-lite",
77
+ api_key=os.getenv("GEMINI_API_KEY"),
78
  temperature=0.5,
79
  max_tokens=1024,
 
80
  )
81
 
82
  model.last_input_token_count = 0