MikeMann commited on
Commit
9117678
·
1 Parent(s): 4a7de3e

fixed response

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -551,9 +551,9 @@ 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
-
555
- history[-1]['content'] += token.choices[0].delta.content
556
- yield history, image_gallery
557
  end = time.time()
558
  print("End2End Query took", end - start, "seconds!")
559
 
 
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()
558
  print("End2End Query took", end - start, "seconds!")
559