Update app.py
This commit is contained in:
parent
4c5160df09
commit
0511dd38cc
7
app.py
7
app.py
|
|
@ -114,9 +114,10 @@ def model_inference(
|
||||||
doctag_output = ""
|
doctag_output = ""
|
||||||
|
|
||||||
for new_text in streamer:
|
for new_text in streamer:
|
||||||
if new_text != "<end_of_utterance>":
|
if "<end_of_utterance>" in new_text:
|
||||||
buffer += html.escape(new_text)
|
continue # Skip it entirely
|
||||||
doctag_output += new_text
|
buffer += html.escape(new_text)
|
||||||
|
doctag_output += new_text
|
||||||
yield buffer
|
yield buffer
|
||||||
|
|
||||||
if any(tag in doctag_output for tag in ["<doctag>", "<otsl>", "<code>", "<formula>", "<chart>"]):
|
if any(tag in doctag_output for tag in ["<doctag>", "<otsl>", "<code>", "<formula>", "<chart>"]):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue