Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -117,24 +117,25 @@ def run_agent():
|
|
| 117 |
print("Finished submission.")
|
| 118 |
|
| 119 |
# ===============================
|
| 120 |
-
# GRADIO
|
| 121 |
# ===============================
|
| 122 |
|
| 123 |
-
def run_pipeline(
|
| 124 |
try:
|
| 125 |
run_agent()
|
| 126 |
return "✅ GAIA submission completed. Check leaderboard."
|
| 127 |
except Exception as e:
|
| 128 |
return f"❌ Error occurred: {str(e)}"
|
| 129 |
|
| 130 |
-
#
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
|
|
|
| 138 |
|
| 139 |
if __name__ == "__main__":
|
| 140 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|
|
|
|
| 117 |
print("Finished submission.")
|
| 118 |
|
| 119 |
# ===============================
|
| 120 |
+
# GRADIO UI
|
| 121 |
# ===============================
|
| 122 |
|
| 123 |
+
def run_pipeline():
|
| 124 |
try:
|
| 125 |
run_agent()
|
| 126 |
return "✅ GAIA submission completed. Check leaderboard."
|
| 127 |
except Exception as e:
|
| 128 |
return f"❌ Error occurred: {str(e)}"
|
| 129 |
|
| 130 |
+
# Create a simple text output
|
| 131 |
+
output_text = gr.Textbox(label="Output", lines=4)
|
| 132 |
+
|
| 133 |
+
# Create a button and link it to the function
|
| 134 |
+
run_button = gr.Button("Run GAIA Agent")
|
| 135 |
+
run_button.click(fn=run_pipeline, inputs=[], outputs=output_text)
|
| 136 |
+
|
| 137 |
+
# Launch the interface
|
| 138 |
+
demo = gr.Row([run_button, output_text])
|
| 139 |
|
| 140 |
if __name__ == "__main__":
|
| 141 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|