jcleee commited on
Commit
3378301
·
verified ·
1 Parent(s): 56ea8ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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
- # === LAUNCH UI WITH SUBMIT FUNCTION ===
106
- GradioUI(agent, file_upload_folder="downloads", submit_fn=lambda: submit_answers(agent)).launch()
 
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()