Spaces:
Sleeping
Sleeping
# app.py | |
import gradio as gr | |
from inference import deepseek_query | |
from agents.philosopher import PhilosopherAgent | |
from agents.historian import HistorianAgent | |
from agents.hacker import HackerAgent | |
from agents.comedian import ComedianAgent | |
# Load agents | |
agents = [ | |
PhilosopherAgent(), | |
HistorianAgent(), | |
HackerAgent(), | |
ComedianAgent() | |
] | |
# Main chat function | |
def chat(prompt): | |
responses = [] | |
for agent in agents: | |
reply = agent.generate_response(prompt, deepseek_query) | |
responses.append(f"{agent.name}: {reply.strip()}") | |
return "\n\n".join(responses) | |
# Gradio UI | |
gr.Interface( | |
fn=chat, | |
inputs="text", | |
outputs="text", | |
title="🧠 Multi-Agent AI Chatroom", | |
description="Talk to a Philosopher, Historian, Hacker, and Comedian — all at once!" | |
).launch() | |