Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -116,19 +116,19 @@ def visualize(title, sentence_list, best_sentences):
|
|
116 |
text = ''
|
117 |
|
118 |
#display(HTML(f'<h1>Summary - {title}</h1>'))
|
119 |
-
for
|
120 |
-
if
|
121 |
-
#text += ' ' + str(
|
122 |
-
text += ' ' + str(
|
123 |
else:
|
124 |
-
text += ' ' +
|
125 |
display(HTML(f""" {text} """))
|
126 |
|
127 |
output = ''
|
128 |
best_sentences = []
|
129 |
-
for
|
130 |
#print(sentence)
|
131 |
-
best_sentences.append(str(
|
132 |
return text
|
133 |
|
134 |
|
|
|
116 |
text = ''
|
117 |
|
118 |
#display(HTML(f'<h1>Summary - {title}</h1>'))
|
119 |
+
for run_text in sentence_list:
|
120 |
+
if run_text in best_sentences:
|
121 |
+
#text += ' ' + str(run_text).replace(run_text, f"<mark>{run_text}</mark>")
|
122 |
+
text += ' ' + str(run_text).replace(run_text, f"<span class='highlight yellow'>{run_text}</span>")
|
123 |
else:
|
124 |
+
text += ' ' + run_text
|
125 |
display(HTML(f""" {text} """))
|
126 |
|
127 |
output = ''
|
128 |
best_sentences = []
|
129 |
+
for run_text in output:
|
130 |
#print(sentence)
|
131 |
+
best_sentences.append(str(run_text))
|
132 |
return text
|
133 |
|
134 |
|