Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -117,7 +117,7 @@ def run_agent():
|
|
| 117 |
print("Finished submission.")
|
| 118 |
|
| 119 |
# ===============================
|
| 120 |
-
# GRADIO UI
|
| 121 |
# ===============================
|
| 122 |
|
| 123 |
def run_pipeline():
|
|
@@ -127,15 +127,12 @@ def run_pipeline():
|
|
| 127 |
except Exception as e:
|
| 128 |
return f"❌ Error occurred: {str(e)}"
|
| 129 |
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 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)
|
|
|
|
| 117 |
print("Finished submission.")
|
| 118 |
|
| 119 |
# ===============================
|
| 120 |
+
# GRADIO BLOCKS UI
|
| 121 |
# ===============================
|
| 122 |
|
| 123 |
def run_pipeline():
|
|
|
|
| 127 |
except Exception as e:
|
| 128 |
return f"❌ Error occurred: {str(e)}"
|
| 129 |
|
| 130 |
+
with gr.Blocks() as demo:
|
| 131 |
+
run_button = gr.Button("Run GAIA Agent")
|
| 132 |
+
output_text = gr.Textbox(label="Output", lines=4)
|
| 133 |
+
|
| 134 |
+
# Link button click to function
|
| 135 |
+
run_button.click(fn=run_pipeline, inputs=[], outputs=output_text)
|
|
|
|
|
|
|
|
|
|
| 136 |
|
| 137 |
if __name__ == "__main__":
|
| 138 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|