NCTCMumbai commited on
Commit
72e1224
·
verified ·
1 Parent(s): c7c6546

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -112,7 +112,7 @@ def bot(history, api_kind):
112
  history[-1][1] = character
113
  #yield history, prompt_html
114
  print('final history is ',history)
115
- return history, prompt_html
116
 
117
  except Exception as e: # Catch any exception
118
  print('An unexpected error occurred during generation:', str(e))
@@ -157,7 +157,7 @@ with gr.Blocks(theme='WeixuanYuan/Soft_dark') as demo:
157
  try:
158
  # Turn off interactivity while generating if you click
159
  txt_msg = txt_btn.click(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
160
- bot, [chatbot, api_kind], [chatbot1, prompt_html])
161
  except Exception as e:
162
  print ('Exception txt btn click ' ,str(e))
163
  # Turn it back on
 
112
  history[-1][1] = character
113
  #yield history, prompt_html
114
  print('final history is ',history)
115
+ return history[-1][1], prompt_html
116
 
117
  except Exception as e: # Catch any exception
118
  print('An unexpected error occurred during generation:', str(e))
 
157
  try:
158
  # Turn off interactivity while generating if you click
159
  txt_msg = txt_btn.click(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
160
+ bot, [chatbot, api_kind], [chattext, prompt_html])
161
  except Exception as e:
162
  print ('Exception txt btn click ' ,str(e))
163
  # Turn it back on