asnassar commited on
Commit
4ff2750
·
verified ·
1 Parent(s): 0511dd3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
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>" in new_text:
118
- continue # Skip it entirely
119
- buffer += html.escape(new_text)
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>"]):