xzl12306 commited on
Commit
98ec381
1 Parent(s): dc6e6a5

fix regenerate bug

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -258,6 +258,9 @@ def get_response(params):
258
 
259
 
260
  def http_bot(state, temperature, top_p, max_new_tokens):
 
 
 
261
  if state.skip_next:
262
  # This generate call is skipped due to invalid inputs
263
  yield (state, state.to_gradio_chatbot())
 
258
 
259
 
260
  def http_bot(state, temperature, top_p, max_new_tokens):
261
+ if state is None:
262
+ return (None, "")
263
+
264
  if state.skip_next:
265
  # This generate call is skipped due to invalid inputs
266
  yield (state, state.to_gradio_chatbot())