mohammedelfeky-ai commited on
Commit
aca67d6
·
verified ·
1 Parent(s): 43ba2a0

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, tool
2
  import datetime
3
  import requests
4
  import pytz
@@ -284,11 +284,11 @@ visit_webpage=VisitWebpageTool()
284
  # 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:
285
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
286
 
287
- # Load LLM
288
- model = GeminiModel(
289
- model="gemini-1.5-pro", # Using Gemini 1.5 Pro which is powerful but has free tier
290
- temperature=0.5,
291
- max_tokens=2048,
292
  )
293
 
294
 
 
1
+ from smolagents import CodeAgent, DuckDuckGoSearchTool, load_tool, tool, LiteLLMModel
2
  import datetime
3
  import requests
4
  import pytz
 
284
  # 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:
285
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
286
 
287
+ model = LiteLLMModel(
288
+ model_id="gemini/gemini-2.0-flash",
289
+ api_key=os.getenv("GEMINI_KEY"),
290
+ max_tokens=8192,
291
+ temperature=0.7
292
  )
293
 
294