Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
import os
|
| 2 |
import requests
|
| 3 |
from duckduckgo_search import DDGS
|
|
|
|
| 4 |
|
| 5 |
# ===============================
|
| 6 |
# CONFIG
|
|
@@ -136,8 +137,23 @@ def run_agent():
|
|
| 136 |
print("Finished submission.")
|
| 137 |
|
| 138 |
# ===============================
|
| 139 |
-
#
|
| 140 |
# ===============================
|
| 141 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 142 |
if __name__ == "__main__":
|
| 143 |
-
|
|
|
|
| 1 |
import os
|
| 2 |
import requests
|
| 3 |
from duckduckgo_search import DDGS
|
| 4 |
+
import gradio as gr
|
| 5 |
|
| 6 |
# ===============================
|
| 7 |
# CONFIG
|
|
|
|
| 137 |
print("Finished submission.")
|
| 138 |
|
| 139 |
# ===============================
|
| 140 |
+
# GRADIO UI (Required for Spaces)
|
| 141 |
# ===============================
|
| 142 |
|
| 143 |
+
def run_pipeline():
|
| 144 |
+
try:
|
| 145 |
+
run_agent()
|
| 146 |
+
return "✅ GAIA submission completed. Check leaderboard."
|
| 147 |
+
except Exception as e:
|
| 148 |
+
return f"❌ Error occurred: {str(e)}"
|
| 149 |
+
|
| 150 |
+
demo = gr.Interface(
|
| 151 |
+
fn=run_pipeline,
|
| 152 |
+
inputs=None,
|
| 153 |
+
outputs="text",
|
| 154 |
+
title="GAIA Final Assignment Agent",
|
| 155 |
+
description="Click Run to execute your GAIA agent and submit answers."
|
| 156 |
+
)
|
| 157 |
+
|
| 158 |
if __name__ == "__main__":
|
| 159 |
+
demo.launch(server_name="0.0.0.0", server_port=7860)
|