Spaces:
Paused
Paused
updated retry button
Browse files
app.py
CHANGED
@@ -149,7 +149,8 @@ def retry_last_answer(
|
|
149 |
history,
|
150 |
past_key_values
|
151 |
):
|
152 |
-
|
|
|
153 |
if chatbot and history:
|
154 |
# Removing the previous conversation from chat
|
155 |
chatbot.pop(-1)
|
@@ -158,8 +159,11 @@ def retry_last_answer(
|
|
158 |
# Setting up a flag to capture a retry
|
159 |
RETRY_FLAG = True
|
160 |
# Getting last message from user
|
161 |
-
|
162 |
-
|
|
|
|
|
|
|
163 |
yield from predict(
|
164 |
RETRY_FLAG,
|
165 |
user_input,
|
|
|
149 |
history,
|
150 |
past_key_values
|
151 |
):
|
152 |
+
print(f"chatbot is - {chatbot}")
|
153 |
+
print(f"history is - {history}")
|
154 |
if chatbot and history:
|
155 |
# Removing the previous conversation from chat
|
156 |
chatbot.pop(-1)
|
|
|
159 |
# Setting up a flag to capture a retry
|
160 |
RETRY_FLAG = True
|
161 |
# Getting last message from user
|
162 |
+
user_input = history[-1]
|
163 |
+
|
164 |
+
print(f"popped chatbot is - {chatbot}")
|
165 |
+
print(f"popped history is - {history}")
|
166 |
+
|
167 |
yield from predict(
|
168 |
RETRY_FLAG,
|
169 |
user_input,
|