davemasino commited on
Commit
5b9ea28
·
verified ·
1 Parent(s): 60f2dcd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -10
app.py CHANGED
@@ -1,5 +1,6 @@
1
  from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
2
  from smolagents import LiteLLMModel # For Gemeni
 
3
  import datetime
4
  import requests
5
  import pytz
@@ -51,20 +52,17 @@ visit_webpage = VisitWebpageTool()
51
  web_search = DuckDuckGoSearchTool()
52
 
53
  # 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:
54
- model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
55
-
56
- model = HfApiModel(
57
- max_tokens=2096,
58
- temperature=0.5,
59
- model_id=model_id, ###'Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
60
- custom_role_conversions=None,
61
- )
62
 
 
 
 
 
 
 
63
 
64
  model = LiteLLMModel(model_id="gemini/gemini-2.0-flash-lite", api_key=os.getenv(key="GEMINI_API_KEY"))
65
 
66
-
67
-
68
  # Import tool from Hub
69
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
70
 
 
1
  from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
2
  from smolagents import LiteLLMModel # For Gemeni
3
+ import os
4
  import datetime
5
  import requests
6
  import pytz
 
52
  web_search = DuckDuckGoSearchTool()
53
 
54
  # 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:
55
+ #model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
 
 
 
 
 
 
 
56
 
57
+ #model = HfApiModel(
58
+ #max_tokens=2096,
59
+ #temperature=0.5,
60
+ #model_id=model_id, ###'Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
61
+ #custom_role_conversions=None,
62
+ #)
63
 
64
  model = LiteLLMModel(model_id="gemini/gemini-2.0-flash-lite", api_key=os.getenv(key="GEMINI_API_KEY"))
65
 
 
 
66
  # Import tool from Hub
67
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
68