finalf0 commited on
Commit
52bef56
1 Parent(s): f002ad9

add print answer

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -150,7 +150,9 @@ def chat(img, msgs, ctx, params=None, vision_hidden_states=None):
150
  res = res.replace('</ref>', '')
151
  res = res.replace('<box>', '')
152
  answer = res.replace('</box>', '')
 
153
  for char in answer:
 
154
  yield char
155
  except Exception as e:
156
  print(e)
 
150
  res = res.replace('</ref>', '')
151
  res = res.replace('<box>', '')
152
  answer = res.replace('</box>', '')
153
+ print('answer:')
154
  for char in answer:
155
+ print(char, flush=True, end='')
156
  yield char
157
  except Exception as e:
158
  print(e)