Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -359,18 +359,26 @@ examples = [
|
|
| 359 |
["What are the key differences between SQL and NoSQL databases, and when should I use each type of database?", None, None, None, None, None, ],
|
| 360 |
]
|
| 361 |
|
| 362 |
-
|
| 363 |
-
|
| 364 |
-
|
| 365 |
-
|
| 366 |
-
|
| 367 |
-
|
| 368 |
-
|
| 369 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 370 |
msg = gr.Textbox()
|
| 371 |
-
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
|
| 375 |
-
|
| 376 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
| 359 |
["What are the key differences between SQL and NoSQL databases, and when should I use each type of database?", None, None, None, None, None, ],
|
| 360 |
]
|
| 361 |
|
| 362 |
+
|
| 363 |
+
# Define the main Gradio interface
|
| 364 |
+
with gr.Blocks() as iface:
|
| 365 |
+
# Chat Interface
|
| 366 |
+
chat_interface = gr.ChatInterface(
|
| 367 |
+
fn=run,
|
| 368 |
+
title="""Fragmixt: Autonomous Agents With Agents...Surf With a Purpose!""",
|
| 369 |
+
examples=examples,
|
| 370 |
+
concurrency_limit=20,
|
| 371 |
+
)
|
| 372 |
+
|
| 373 |
+
# Other components within the same interface
|
| 374 |
+
with gr.Row():
|
| 375 |
msg = gr.Textbox()
|
| 376 |
+
submit_b = gr.Button()
|
| 377 |
+
clear = gr.ClearButton([msg, chat_interface])
|
| 378 |
+
|
| 379 |
+
# Event handling
|
| 380 |
+
submit_b.click(run, [msg, chat_interface], [msg, chat_interface])
|
| 381 |
+
msg.submit(run, [msg, chat_interface], [msg, chat_interface])
|
| 382 |
+
|
| 383 |
+
# Launch the interface
|
| 384 |
+
iface.launch()
|