mmargg commited on
Commit
1096d51
·
verified ·
1 Parent(s): 91506bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -271,19 +271,19 @@ with gr.Blocks(
271
 
272
 
273
  #with gr.Blocks() as demo:
274
- chatbot = gr.Chatbot()
275
- username_input = gr.Textbox(label="Username")
276
- save_button = gr.Button("Save Chat History")
277
- download_button = gr.File(label="Download Chat History", visible=False)
278
 
279
- save_button.click(
280
- fn=save_chat_history,
281
- inputs=[chatbot, username_input],
282
- outputs=download_button
283
- ).then(
284
- fn=lambda: gr.update(visible=True),
285
- outputs=download_button
286
- )
287
 
288
  #launching chatbot
289
  demo.launch()
 
271
 
272
 
273
  #with gr.Blocks() as demo:
274
+ chatbot = gr.Chatbot()
275
+ username_input = gr.Textbox(label="Username")
276
+ save_button = gr.Button("Save Chat History")
277
+ download_button = gr.File(label="Download Chat History", visible=False)
278
 
279
+ save_button.click(
280
+ fn=save_chat_history,
281
+ inputs=[chatbot, username_input],
282
+ outputs=download_button
283
+ ).then(
284
+ fn=lambda: gr.update(visible=True),
285
+ outputs=download_button
286
+ )
287
 
288
  #launching chatbot
289
  demo.launch()