crystalkalem commited on
Commit
9e7f5c5
·
verified ·
1 Parent(s): b4584a9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -19,13 +19,13 @@ def generate(message, history,temperature=0.9,max_tokens=768):
19
 
20
  mychatbot = gr.Chatbot(
21
  avatar_images=["user.png", "bots.png"], bubble_full_width=False, show_label=False, show_copy_button=True, likeable=True,)
22
- def retry(message, history):
23
  # Remove the last user message from the history
24
  history = history[:-1]
25
  # Generate a new response using the updated history
26
  return generate(message, history)
27
 
28
- def undo(message, history):
29
  # Remove the last user message and the last bot response from the history
30
  history = history[:-2]
31
  # Return the updated history
 
19
 
20
  mychatbot = gr.Chatbot(
21
  avatar_images=["user.png", "bots.png"], bubble_full_width=False, show_label=False, show_copy_button=True, likeable=True,)
22
+ def Retry(message, history):
23
  # Remove the last user message from the history
24
  history = history[:-1]
25
  # Generate a new response using the updated history
26
  return generate(message, history)
27
 
28
+ def Undo(message, history):
29
  # Remove the last user message and the last bot response from the history
30
  history = history[:-2]
31
  # Return the updated history