Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,19 +1,22 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from agentos_core import AgentCore
|
| 3 |
|
|
|
|
| 4 |
agent = AgentCore()
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
|
|
|
|
|
|
| 9 |
|
|
|
|
| 10 |
iface = gr.Interface(
|
| 11 |
-
fn=
|
| 12 |
-
inputs=gr.Textbox(
|
| 13 |
-
outputs="
|
| 14 |
-
title="AgentOS MVP",
|
| 15 |
-
description="Your self-learning AgentCore running with telemetry + memory."
|
| 16 |
)
|
| 17 |
|
| 18 |
-
|
| 19 |
-
iface.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from agentos_core import AgentCore
|
| 3 |
|
| 4 |
+
# Initialize your Agent
|
| 5 |
agent = AgentCore()
|
| 6 |
|
| 7 |
+
# Function to handle prompt input/output
|
| 8 |
+
def run_agent(prompt):
|
| 9 |
+
if not prompt or prompt.strip() == "":
|
| 10 |
+
return "⚠️ Please enter a valid prompt."
|
| 11 |
+
return agent.run(prompt)
|
| 12 |
|
| 13 |
+
# Launch Gradio interface
|
| 14 |
iface = gr.Interface(
|
| 15 |
+
fn=run_agent,
|
| 16 |
+
inputs=gr.Textbox(label="Enter Prompt"),
|
| 17 |
+
outputs=gr.Textbox(label="Agent Output"),
|
| 18 |
+
title="🧠 AgentOS MVP",
|
| 19 |
+
description="Your self-learning AgentCore running with telemetry + memory."
|
| 20 |
)
|
| 21 |
|
| 22 |
+
iface.launch()
|
|
|