NCTCMumbai
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -165,8 +165,8 @@ def bot(history, cross_encoder):
|
|
165 |
new_history[-1] = (query, output)
|
166 |
print('New History',new_history)
|
167 |
print('prompt html',prompt_html)# Update the last tuple with new text
|
168 |
-
|
169 |
-
|
170 |
# history[-1][1] = ""
|
171 |
# for character in generate_fn(prompt, history[:-1]):
|
172 |
# history[-1][1] = character
|
@@ -261,7 +261,7 @@ with gr.Blocks(theme='gradio/soft') as CHATBOT:
|
|
261 |
|
262 |
# Call bot function
|
263 |
# bot_output = list(bot(history, cross_encoder))
|
264 |
-
bot_output = (bot(history, cross_encoder))
|
265 |
print('bot_output',bot_output)
|
266 |
#history, prompt_html = bot_output[-1]
|
267 |
history, prompt_html = bot_output
|
|
|
165 |
new_history[-1] = (query, output)
|
166 |
print('New History',new_history)
|
167 |
print('prompt html',prompt_html)# Update the last tuple with new text
|
168 |
+
yield new_history, prompt_html
|
169 |
+
# new_history,prompt_html
|
170 |
# history[-1][1] = ""
|
171 |
# for character in generate_fn(prompt, history[:-1]):
|
172 |
# history[-1][1] = character
|
|
|
261 |
|
262 |
# Call bot function
|
263 |
# bot_output = list(bot(history, cross_encoder))
|
264 |
+
bot_output = next(bot(history, cross_encoder))
|
265 |
print('bot_output',bot_output)
|
266 |
#history, prompt_html = bot_output[-1]
|
267 |
history, prompt_html = bot_output
|