File size: 718 Bytes
82d846e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import gradio as gr
from world import run_world

def start_agents(dummy_input="Start"):
    yield "🔄 Running agents... please wait. This may take a few seconds."
    result = run_world()
    combined_output = ""
    for filename, content in result.items():
        combined_output += f"## {filename}\n```\n{content}\n```\n\n"
    yield combined_output

with gr.Blocks() as demo:
    gr.Markdown("# 🧠 Multi-Agent System with Autogen + gRPC")

    with gr.Row():
        run_button = gr.Button("🚀 Run Agents")
        status = gr.Markdown()

    run_button.click(
        fn=start_agents,
        inputs=[],
        outputs=status,
        show_progress=True
    )

if __name__ == "__main__":
    demo.launch()