Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -114,10 +114,9 @@ def model_inference(
|
|
| 114 |
doctag_output = ""
|
| 115 |
|
| 116 |
for new_text in streamer:
|
| 117 |
-
if "<end_of_utterance>"
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
doctag_output += new_text
|
| 121 |
yield buffer
|
| 122 |
|
| 123 |
if any(tag in doctag_output for tag in ["<doctag>", "<otsl>", "<code>", "<formula>", "<chart>"]):
|
|
|
|
| 114 |
doctag_output = ""
|
| 115 |
|
| 116 |
for new_text in streamer:
|
| 117 |
+
if new_text != "<end_of_utterance>":
|
| 118 |
+
buffer += html.escape(new_text)
|
| 119 |
+
doctag_output += new_text
|
|
|
|
| 120 |
yield buffer
|
| 121 |
|
| 122 |
if any(tag in doctag_output for tag in ["<doctag>", "<otsl>", "<code>", "<formula>", "<chart>"]):
|