ECUiVADE commited on
Commit
9adf13f
1 Parent(s): cdbe870

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -12
app.py CHANGED
@@ -235,18 +235,6 @@ chat_bot=gr.ChatInterface(
235
  title="""AI Chat Bot - ECU IVADE"""
236
  )
237
 
238
- reset_interface = gr.Interface(
239
- fn=reset_all, # Placeholder function, actual reset is handled by button actions
240
- inputs=[
241
- gr.Button("Reset All", elem_id="button1"),
242
- ],
243
- outputs="text",
244
- title="Reset Controls",
245
- description="Use the button below to reset "
246
- )
247
-
248
- def print_something():
249
- print("something")
250
 
251
  name_interface = gr.Interface(
252
  fn=name_interface,
@@ -262,6 +250,15 @@ name_interface = gr.Interface(
262
  description="Please enter your name and occupation."
263
  )
264
 
 
 
 
 
 
 
 
 
 
265
  tabs = gr.TabbedInterface([name_interface, chat_bot], ["User Info", "Chat Bot"])
266
 
267
  if __name__ == "__main__":
 
235
  title="""AI Chat Bot - ECU IVADE"""
236
  )
237
 
 
 
 
 
 
 
 
 
 
 
 
 
238
 
239
  name_interface = gr.Interface(
240
  fn=name_interface,
 
250
  description="Please enter your name and occupation."
251
  )
252
 
253
+
254
+ with gr.Blocks() as demo:
255
+ gr.Markdown("Start typing below and then click **Run** to see the output.")
256
+ with gr.Row():
257
+ out = gr.Textbox()
258
+ btn = gr.Button("Reset ChatBot Instance")
259
+ btn.click(fn=reset_all, inputs=None, outputs=out)
260
+
261
+
262
  tabs = gr.TabbedInterface([name_interface, chat_bot], ["User Info", "Chat Bot"])
263
 
264
  if __name__ == "__main__":