Spaces:
Running
Running
Update app.py
Browse files
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:
|