brunhild217 commited on
Commit
f3685f7
·
1 Parent(s): 7864b80

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -80,8 +80,6 @@ with gr.Blocks() as demo:
80
  with gr.Row():
81
  user_chat_input = gr.Textbox(label="User input", scale=9)
82
  user_chat_submit = gr.Button("Ask/answer model", scale=1)
83
-
84
- clear_btn = gr.Button("Start a new conversation")
85
 
86
  user_chat_submit.click(add_user_message,
87
  [user_chat_input, study_tutor],
@@ -89,7 +87,9 @@ with gr.Blocks() as demo:
89
  get_tutor_reply, [user_chat_input, study_tutor], [user_chat_input, chatbot, study_tutor], queue=True)
90
 
91
  # Testing purpose
92
- gr.Interface(fn=get_conversation_history, inputs=[study_tutor], outputs=["text", study_tutor])
 
 
93
 
94
  with gr.Blocks():
95
  gr.Markdown("""
 
80
  with gr.Row():
81
  user_chat_input = gr.Textbox(label="User input", scale=9)
82
  user_chat_submit = gr.Button("Ask/answer model", scale=1)
 
 
83
 
84
  user_chat_submit.click(add_user_message,
85
  [user_chat_input, study_tutor],
 
87
  get_tutor_reply, [user_chat_input, study_tutor], [user_chat_input, chatbot, study_tutor], queue=True)
88
 
89
  # Testing purpose
90
+ test_btn = gr.Button("View your chat history")
91
+ chat_history = gr.Textbox(label = "conversation history")
92
+ test_btn.click(get_conversation_history, inputs=[study_tutor], outputs=[chat_history, study_tutor])
93
 
94
  with gr.Blocks():
95
  gr.Markdown("""