From 0511dd38cce7c3ce5a8cd473037f686c2380fb10 Mon Sep 17 00:00:00 2001 From: Ahmed Nassar Date: Mon, 17 Mar 2025 12:03:02 +0000 Subject: [PATCH] Update app.py --- app.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index f467107..b83d6a0 100644 --- a/app.py +++ b/app.py @@ -114,9 +114,10 @@ def model_inference( doctag_output = "" for new_text in streamer: - if new_text != "": - buffer += html.escape(new_text) - doctag_output += new_text + if "" in new_text: + continue # Skip it entirely + buffer += html.escape(new_text) + doctag_output += new_text yield buffer if any(tag in doctag_output for tag in ["", "", "", "", ""]):