Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,8 +9,6 @@ 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 |
-
from submit import main as submit_answers # Make sure this exists and does NOT import from app.py
|
| 13 |
-
|
| 14 |
|
| 15 |
# === TOOLS ===
|
| 16 |
|
|
@@ -79,6 +77,8 @@ model = LiteLLMModel(
|
|
| 79 |
max_tokens=1024,
|
| 80 |
)
|
| 81 |
|
|
|
|
|
|
|
| 82 |
# === IMPORT TOOL FROM HUB ===
|
| 83 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 84 |
|
|
@@ -102,5 +102,5 @@ agent = CodeAgent(
|
|
| 102 |
prompt_templates=prompt_templates
|
| 103 |
)
|
| 104 |
|
| 105 |
-
#
|
| 106 |
-
GradioUI(agent
|
|
|
|
| 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 ===
|
| 14 |
|
|
|
|
| 77 |
max_tokens=1024,
|
| 78 |
)
|
| 79 |
|
| 80 |
+
|
| 81 |
+
|
| 82 |
# === IMPORT TOOL FROM HUB ===
|
| 83 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 84 |
|
|
|
|
| 102 |
prompt_templates=prompt_templates
|
| 103 |
)
|
| 104 |
|
| 105 |
+
# === LAUNCH UI ===
|
| 106 |
+
GradioUI(agent).launch()
|