peterkros commited on
Commit
f836d8d
·
verified ·
1 Parent(s): 4d07f34

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -61,7 +61,7 @@ def generate_response(selected_question):
61
  chat_history.append(new_response)
62
  follow_up_questions = []
63
 
64
- return chat_history, follow_up_questions
65
 
66
  def update_examples(follow_up_questions):
67
  return gr.Dataframe.update(value=[[q] for q in follow_up_questions])
@@ -86,7 +86,7 @@ with gr.Blocks() as demo:
86
  txt = gr.Textbox(scale=4, show_label=False, placeholder="Select Question", container=False, interactive=False) # Adjust based on need
87
  btn = gr.Button("Submit")
88
 
89
- examples_df = gr.Dataframe(headers=["Suggested Questions"], datatype="str")
90
 
91
  btn.click(fn=generate_response, inputs=[txt], outputs=[chatbot, examples_df])
92
 
@@ -104,4 +104,4 @@ with gr.Blocks() as demo:
104
  chatbot.like(print_like_dislike, None, None)
105
 
106
  if __name__ == "__main__":
107
- demo.launch()
 
61
  chat_history.append(new_response)
62
  follow_up_questions = []
63
 
64
+ return chat_history, [[q] for q in follow_up_questions]
65
 
66
  def update_examples(follow_up_questions):
67
  return gr.Dataframe.update(value=[[q] for q in follow_up_questions])
 
86
  txt = gr.Textbox(scale=4, show_label=False, placeholder="Select Question", container=False, interactive=False) # Adjust based on need
87
  btn = gr.Button("Submit")
88
 
89
+ examples_df = gr.Dataframe(headers=["Suggested Questions"], datatype="str", interactive=False)
90
 
91
  btn.click(fn=generate_response, inputs=[txt], outputs=[chatbot, examples_df])
92
 
 
104
  chatbot.like(print_like_dislike, None, None)
105
 
106
  if __name__ == "__main__":
107
+ demo.launch(share=False)