Tpayne101 commited on
Commit
da34586
·
verified ·
1 Parent(s): 39a7b5e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -31
app.py CHANGED
@@ -1,40 +1,19 @@
1
  import gradio as gr
2
  from agentos_core import AgentCore
3
 
4
- if __name__ == "__main__":
5
- # Create your first agent instance
6
- agent = AgentCore()
7
-
8
- # Test prompt
9
- test_prompt = "Hello Agent, summarize what you are."
10
- response = agent.run(test_prompt)
11
 
12
- print("=== Agent Output ===")
13
- print(response)
 
14
 
15
  iface = gr.Interface(
16
  fn=interact,
17
- if __name__ == "__main__":
18
- agent = AgentCore()
19
-
20
- while True:
21
- prompt = input("You: ")
22
- if prompt.lower() in ["exit", "quit"]:
23
- print("Exiting Agent...")
24
- break
25
 
26
- response = agent.run(prompt)
27
- print("Agent:", response)
28
-
29
- iface.launch()
30
  if __name__ == "__main__":
31
- agent = AgentCore()
32
-
33
- while True:
34
- prompt = input("You: ")
35
- if prompt.lower() in ["exit", "quit"]:
36
- print("Exiting Agent...")
37
- break
38
-
39
- response = agent.run(prompt)
40
- print("Agent:", response)
 
1
  import gradio as gr
2
  from agentos_core import AgentCore
3
 
4
+ agent = AgentCore()
 
 
 
 
 
 
5
 
6
+ def interact(prompt):
7
+ response = agent.run(prompt)
8
+ return response
9
 
10
  iface = gr.Interface(
11
  fn=interact,
12
+ inputs=gr.Textbox(lines=2, placeholder="Type a message to your Agent..."),
13
+ outputs="text",
14
+ title="AgentOS MVP",
15
+ description="Your self-learning AgentCore running with telemetry + memory.",
16
+ )
 
 
 
17
 
 
 
 
 
18
  if __name__ == "__main__":
19
+ iface.launch()