lilyhof commited on
Commit
b5cdb39
·
1 Parent(s): e8743b7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -69,6 +69,18 @@ with gr.Blocks() as demo:
69
  queue=True
70
  )
71
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  # Testing the chat history storage, can be deleted at deployment
73
  with gr.Blocks():
74
  test_btn = gr.Button("View your chat history")
 
69
  queue=True
70
  )
71
 
72
+ user_chat_submit.click(
73
+ fn = add_user_message,
74
+ inputs = [user_chat_input, study_tutor],
75
+ outputs = [user_chat_input, chatbot, study_tutor],
76
+ queue=False
77
+ ).then(
78
+ fn = get_tutor_reply,
79
+ inputs = [study_tutor],
80
+ outputs = [user_chat_input, chatbot, study_tutor],
81
+ queue=True
82
+ )
83
+
84
  # Testing the chat history storage, can be deleted at deployment
85
  with gr.Blocks():
86
  test_btn = gr.Button("View your chat history")