NKessler commited on
Commit
8c2978e
·
verified ·
1 Parent(s): 6a5f3c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -153,7 +153,9 @@ def _highlight_framing_words(text: str, target_words: list) -> str:
153
  if not text:
154
  return ""
155
 
156
- words = text.split()
 
 
157
  highlighted_text = display_text
158
 
159
  for word in target_words:
 
153
  if not text:
154
  return ""
155
 
156
+ words = text.split()
157
+ display_text = " ".join(words[:400]) + ("..." if len(words) > 400 else "")
158
+
159
  highlighted_text = display_text
160
 
161
  for word in target_words: