File size: 816 Bytes
89784d2 |
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 29 30 31 32 33 34 35 |
# 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()
|