Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -201,13 +201,15 @@ class HeightComparisonAgent(CodeAgent):
|
|
201 |
# --- Instantiate the Subclassed Agent ---
|
202 |
# IMPORTANT: Use the HeightComparisonAgent class, not CodeAgent directly.
|
203 |
# Set verbosity_level=3 so the parent's run method (super().run) generates the verbose output.
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
|
|
|
|
211 |
|
212 |
# --- Launch Gradio using GradioUI and the custom agent ---
|
213 |
print("--- Starting Gradio Interface with GradioUI and HeightComparisonAgent ---")
|
|
|
201 |
# --- Instantiate the Subclassed Agent ---
|
202 |
# IMPORTANT: Use the HeightComparisonAgent class, not CodeAgent directly.
|
203 |
# Set verbosity_level=3 so the parent's run method (super().run) generates the verbose output.
|
204 |
+
if llm_model is not None:
|
205 |
+
height_agent = HeightComparisonAgent(
|
206 |
+
tools=[DuckDuckGoSearchTool(), VisitWebpageTool(), parse_height_from_text, create_comparison_statement, FinalAnswerTool()],
|
207 |
+
model=llm_model,
|
208 |
+
verbosity_level=3, # <<< Crucial for GradioUI to see the steps from the parent run
|
209 |
+
max_steps=20, # Increased slightly just in case
|
210 |
+
# planning_interval=3, # Optional
|
211 |
+
)
|
212 |
+
else print('Failed to Load LiteLLM Model')
|
213 |
|
214 |
# --- Launch Gradio using GradioUI and the custom agent ---
|
215 |
print("--- Starting Gradio Interface with GradioUI and HeightComparisonAgent ---")
|