Spaces:
Runtime error
Runtime error
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -100,19 +100,19 @@ def run_agent(query: str):
|
|
| 100 |
except Exception as e:
|
| 101 |
return f"An error occurred: {e}"
|
| 102 |
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
#
|
| 117 |
-
|
| 118 |
-
gr.launch()
|
|
|
|
| 100 |
except Exception as e:
|
| 101 |
return f"An error occurred: {e}"
|
| 102 |
|
| 103 |
+
iface = gr.Interface(
|
| 104 |
+
fn=run_agent,
|
| 105 |
+
inputs=gr.Textbox(lines=2, placeholder="Ask the agent anything..."),
|
| 106 |
+
outputs="markdown",
|
| 107 |
+
title="GAIA Agent v0.3 (LangGraph + Code Interpreter)",
|
| 108 |
+
description="This agent can use web search and a Python code interpreter.",
|
| 109 |
+
examples=[
|
| 110 |
+
["What is the square root of the number of states in the USA?"],
|
| 111 |
+
["What is the total number of letters in the names of the first three planets in our solar system?"]
|
| 112 |
+
],
|
| 113 |
+
)
|
| 114 |
+
|
| 115 |
+
|
| 116 |
+
# --- 8. LAUNCH THE APP ---
|
| 117 |
+
iface.launch()
|
| 118 |
+
# gr.launch()
|