|
|
|
|
|
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 |
|
|
|
|
|
agents = [ |
|
PhilosopherAgent(), |
|
HistorianAgent(), |
|
HackerAgent(), |
|
ComedianAgent() |
|
] |
|
|
|
|
|
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) |
|
|
|
|
|
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() |
|
|