Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -507,6 +507,11 @@ def edit_image(
|
|
| 507 |
**inference_hyper,
|
| 508 |
):
|
| 509 |
if isinstance(chunk, str):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 510 |
result_text += chunk
|
| 511 |
else:
|
| 512 |
last_image = chunk
|
|
|
|
| 507 |
**inference_hyper,
|
| 508 |
):
|
| 509 |
if isinstance(chunk, str):
|
| 510 |
+
chunk = (
|
| 511 |
+
chunk.replace("<|im_start|>", "")
|
| 512 |
+
.replace("<|im_end|>", "")
|
| 513 |
+
.replace("<|endoftext|>", "")
|
| 514 |
+
)
|
| 515 |
result_text += chunk
|
| 516 |
else:
|
| 517 |
last_image = chunk
|