Spaces:
Sleeping
Sleeping
| 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() | |