MikeMann commited on
Commit
859bd68
·
1 Parent(s): 9117678

fixed response

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -551,7 +551,7 @@ if __name__ == '__main__':
551
  # token = f"\n{token}"
552
  #if re.match(r"^[1-9]\.",token.choices[0].delta.content):
553
  # token = f"\n{token}"
554
- if token.choices[0].delta.content != "":
555
  history[-1]['content'] += token.choices[0].delta.content
556
  yield history, image_gallery
557
  end = time.time()
 
551
  # token = f"\n{token}"
552
  #if re.match(r"^[1-9]\.",token.choices[0].delta.content):
553
  # token = f"\n{token}"
554
+ if token.choices != None:
555
  history[-1]['content'] += token.choices[0].delta.content
556
  yield history, image_gallery
557
  end = time.time()