ryanrwatkins commited on
Commit
32cae03
·
verified ·
1 Parent(s): 4fb989d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -778,7 +778,7 @@ Standalone question: {question}""")
778
  def submit_message(prompt, prompt_template, temperature, max_tokens, context_length, state):
779
 
780
 
781
- history = state['messages']
782
 
783
 
784
  #global prompt_template_name
@@ -837,6 +837,7 @@ def submit_message(prompt, prompt_template, temperature, max_tokens, context_len
837
 
838
 
839
  def clear_conversation():
 
840
  return gr.update(value=None, visible=True), None, "", get_empty_state()
841
 
842
 
@@ -875,7 +876,7 @@ with gr.Blocks(css=css) as demo:
875
 
876
  btn_submit = gr.Button("Submit")
877
  #total_tokens_str = gr.Markdown(elem_id="total_tokens_str")
878
- btn_clear_conversation = gr.Button("Start New Conversation", visible=False)
879
 
880
 
881
  with gr.Column(visible=False):
 
778
  def submit_message(prompt, prompt_template, temperature, max_tokens, context_length, state):
779
 
780
 
781
+ #history = state['messages']
782
 
783
 
784
  #global prompt_template_name
 
837
 
838
 
839
  def clear_conversation():
840
+ memory.clear()
841
  return gr.update(value=None, visible=True), None, "", get_empty_state()
842
 
843
 
 
876
 
877
  btn_submit = gr.Button("Submit")
878
  #total_tokens_str = gr.Markdown(elem_id="total_tokens_str")
879
+ btn_clear_conversation = gr.Button("Start New Conversation")
880
 
881
 
882
  with gr.Column(visible=False):