Spaces:
Runtime error
Runtime error
Cascade Bot
commited on
Commit
Β·
d2d63a6
1
Parent(s):
677ea96
fix: update Gradio interface to resolve warnings
Browse files- Set chatbot type to 'messages' to use OpenAI-style format
- Remove unnecessary styling parameters
- Simplify component configuration
- Improve visual consistency
app.py
CHANGED
@@ -194,8 +194,7 @@ class ChatInterface:
|
|
194 |
def create_interface(self) -> gr.Blocks:
|
195 |
"""Create the Gradio interface."""
|
196 |
with gr.Blocks(
|
197 |
-
title="Advanced Agentic System"
|
198 |
-
theme=gr.themes.Default()
|
199 |
) as interface:
|
200 |
gr.Markdown("""
|
201 |
# π€ Advanced Agentic System Chat Interface
|
@@ -217,32 +216,23 @@ class ChatInterface:
|
|
217 |
""")
|
218 |
|
219 |
chatbot = gr.Chatbot(
|
220 |
-
|
221 |
-
height=
|
222 |
-
|
223 |
-
render_markdown=True
|
224 |
)
|
225 |
|
226 |
with gr.Row():
|
227 |
msg = gr.Textbox(
|
228 |
-
|
229 |
placeholder="Chat with the Agentic System...",
|
230 |
-
|
231 |
-
)
|
232 |
-
submit = gr.Button(
|
233 |
-
"Send π",
|
234 |
-
variant="primary"
|
235 |
)
|
|
|
236 |
|
237 |
with gr.Row():
|
238 |
-
clear = gr.ClearButton(
|
239 |
-
|
240 |
-
|
241 |
-
)
|
242 |
-
retry = gr.Button(
|
243 |
-
"Retry Last π"
|
244 |
-
)
|
245 |
-
|
246 |
async def respond(message, history):
|
247 |
"""Handle chat responses with proper formatting."""
|
248 |
try:
|
|
|
194 |
def create_interface(self) -> gr.Blocks:
|
195 |
"""Create the Gradio interface."""
|
196 |
with gr.Blocks(
|
197 |
+
title="Advanced Agentic System"
|
|
|
198 |
) as interface:
|
199 |
gr.Markdown("""
|
200 |
# π€ Advanced Agentic System Chat Interface
|
|
|
216 |
""")
|
217 |
|
218 |
chatbot = gr.Chatbot(
|
219 |
+
show_label=False,
|
220 |
+
height=500,
|
221 |
+
type="messages" # Use OpenAI-style message format
|
|
|
222 |
)
|
223 |
|
224 |
with gr.Row():
|
225 |
msg = gr.Textbox(
|
226 |
+
show_label=False,
|
227 |
placeholder="Chat with the Agentic System...",
|
228 |
+
container=False
|
|
|
|
|
|
|
|
|
229 |
)
|
230 |
+
submit = gr.Button("Send π")
|
231 |
|
232 |
with gr.Row():
|
233 |
+
clear = gr.ClearButton([msg, chatbot], value="Clear")
|
234 |
+
retry = gr.Button("Retry")
|
235 |
+
|
|
|
|
|
|
|
|
|
|
|
236 |
async def respond(message, history):
|
237 |
"""Handle chat responses with proper formatting."""
|
238 |
try:
|