Update app.py
Browse files
app.py
CHANGED
@@ -40,16 +40,44 @@ def chat(prompt, selected_agents):
|
|
40 |
iface = gr.Interface(
|
41 |
fn=chat,
|
42 |
inputs=[
|
43 |
-
gr.Textbox(
|
|
|
|
|
|
|
|
|
|
|
44 |
gr.CheckboxGroup(
|
45 |
choices=list(agent_map.keys()),
|
46 |
-
label="
|
47 |
-
value=list(agent_map.keys())
|
48 |
)
|
49 |
],
|
50 |
-
outputs="
|
51 |
-
title="🧠 Multi-Agent Chatroom
|
52 |
-
description="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
)
|
54 |
|
55 |
iface.launch()
|
|
|
40 |
iface = gr.Interface(
|
41 |
fn=chat,
|
42 |
inputs=[
|
43 |
+
gr.Textbox(
|
44 |
+
label="💬 Ask Anything",
|
45 |
+
lines=4,
|
46 |
+
placeholder="Ask your question here...",
|
47 |
+
elem_id="chat-input"
|
48 |
+
),
|
49 |
gr.CheckboxGroup(
|
50 |
choices=list(agent_map.keys()),
|
51 |
+
label="🤖 Choose Which Agents to Ask",
|
52 |
+
value=list(agent_map.keys())
|
53 |
)
|
54 |
],
|
55 |
+
outputs=gr.JSON(label="📢 Agent Responses"),
|
56 |
+
title="🧠 Multi-Agent Chatroom",
|
57 |
+
description="Ask multiple AI agents across roles like Philosopher, Hacker, Lawyer, etc. Powered by Groq.",
|
58 |
+
theme=gr.themes.Soft(
|
59 |
+
primary_hue="blue",
|
60 |
+
secondary_hue="purple",
|
61 |
+
font=[gr.themes.GoogleFont("Fira Sans")],
|
62 |
+
radius_size=gr.themes.sizes.radius_md,
|
63 |
+
spacing_size=gr.themes.sizes.spacing_md
|
64 |
+
),
|
65 |
+
css="""
|
66 |
+
#chat-input textarea {
|
67 |
+
font-size: 1.1rem;
|
68 |
+
padding: 12px;
|
69 |
+
background: #1e1e2f;
|
70 |
+
color: white;
|
71 |
+
border-radius: 12px;
|
72 |
+
}
|
73 |
+
body {
|
74 |
+
background-color: #111827;
|
75 |
+
color: white;
|
76 |
+
}
|
77 |
+
.gr-box {
|
78 |
+
border: none;
|
79 |
+
}
|
80 |
+
"""
|
81 |
)
|
82 |
|
83 |
iface.launch()
|