Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ import requests
|
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
import re
|
| 7 |
-
from smolagents import CodeAgent, VisitWebpageTool, InferenceClientModel
|
| 8 |
from smolagents import OpenAIServerModel
|
| 9 |
|
| 10 |
# (Keep Constants as is)
|
|
@@ -15,11 +15,11 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
| 15 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 16 |
class BasicAgent:
|
| 17 |
def __init__(self):
|
| 18 |
-
self.model = OpenAIServerModel("gpt-4o", max_tokens=8096)
|
| 19 |
self.agent = CodeAgent(
|
| 20 |
model=self.model,
|
| 21 |
verbosity_level=0,
|
| 22 |
-
tools=[VisitWebpageTool()],
|
| 23 |
max_steps=10,
|
| 24 |
name="multimodal_agent",
|
| 25 |
description="Multimodal LLM can proceed images",
|
|
|
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
import re
|
| 7 |
+
from smolagents import CodeAgent, VisitWebpageTool, InferenceClientModel, DuckDuckGoSearchTool
|
| 8 |
from smolagents import OpenAIServerModel
|
| 9 |
|
| 10 |
# (Keep Constants as is)
|
|
|
|
| 15 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 16 |
class BasicAgent:
|
| 17 |
def __init__(self):
|
| 18 |
+
self.model = OpenAIServerModel("gpt-4o-mini", max_tokens=8096)
|
| 19 |
self.agent = CodeAgent(
|
| 20 |
model=self.model,
|
| 21 |
verbosity_level=0,
|
| 22 |
+
tools=[VisitWebpageTool(), DuckDuckGoSearchTool()],
|
| 23 |
max_steps=10,
|
| 24 |
name="multimodal_agent",
|
| 25 |
description="Multimodal LLM can proceed images",
|