Spaces:
Runtime error
Runtime error
add print answer
Browse files
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)
|