acecalisto3 commited on
Commit
96ebd64
·
verified ·
1 Parent(s): 87ebe64

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -14
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
- gr.ChatInterface(
363
- fn=run,
364
- title="""Fragmixt: Autonomous Agents With Agents...Surf With a Purpose!""",
365
- examples=examples,
366
- concurrency_limit=20,
367
- with gr.Blocks() as iface:
368
- gr.HTML("""TEST""")
369
- chatbot = gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel")
 
 
 
 
 
370
  msg = gr.Textbox()
371
- with gr.Row():
372
- submit_b = gr.Button()
373
- clear = gr.ClearButton([msg, chatbot])
374
- submit_b.click(run, [msg, chatbot], [msg, chatbot])
375
- msg.submit(run, [msg, chatbot], [msg, chatbot])
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()