Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -118,17 +118,17 @@ agent = CodeAgent(
|
|
| 118 |
)
|
| 119 |
|
| 120 |
# === LAUNCH UI ===
|
| 121 |
-
|
| 122 |
|
| 123 |
import gradio as gr
|
| 124 |
|
| 125 |
-
# OLD VERSION
|
| 126 |
-
def run_agent(question):
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
|
| 133 |
# # NEW VERSION
|
| 134 |
# def run_agent(question):
|
|
|
|
| 118 |
)
|
| 119 |
|
| 120 |
# === LAUNCH UI ===
|
| 121 |
+
GradioUI(agent).launch() # new change 6:36 - for evaluation API
|
| 122 |
|
| 123 |
import gradio as gr
|
| 124 |
|
| 125 |
+
# # OLD VERSION
|
| 126 |
+
# def run_agent(question):
|
| 127 |
+
# try:
|
| 128 |
+
# result = agent(question)
|
| 129 |
+
# return [str(result)] # Must return a list with one string (like ["answer"])
|
| 130 |
+
# except Exception as e:
|
| 131 |
+
# return [f"Error: {e}"]
|
| 132 |
|
| 133 |
# # NEW VERSION
|
| 134 |
# def run_agent(question):
|