artificialguybr commited on
Commit
8a73b38
·
1 Parent(s): 73f07d6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -107,6 +107,8 @@ def reset_state(task_history):
107
  return []
108
 
109
  def regenerate(_chatbot, task_history):
 
 
110
  if not task_history:
111
  return _chatbot
112
  item = task_history[-1]
@@ -118,6 +120,7 @@ def regenerate(_chatbot, task_history):
118
  _chatbot[-1] = (_chatbot[-1][0], None)
119
  else:
120
  _chatbot.append((chatbot_item[0], None))
 
121
  return predict(_chatbot, task_history)
122
 
123
  with gr.Blocks() as demo:
 
107
  return []
108
 
109
  def regenerate(_chatbot, task_history):
110
+ print("Regenerate clicked")
111
+ print("Before:", task_history, _chatbot)
112
  if not task_history:
113
  return _chatbot
114
  item = task_history[-1]
 
120
  _chatbot[-1] = (_chatbot[-1][0], None)
121
  else:
122
  _chatbot.append((chatbot_item[0], None))
123
+ print("After:", task_history, _chatbot)
124
  return predict(_chatbot, task_history)
125
 
126
  with gr.Blocks() as demo: