carisackc commited on
Commit
08f8360
1 Parent(s): 28a30cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
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 sentence in sentence_list:
120
- if sentence in best_sentences:
121
- #text += ' ' + str(sentence).replace(sentence, f"<mark>{sentence}</mark>")
122
- text += ' ' + str(sentence).replace(sentence, f"<span class='highlight yellow'>{sentence}</span>")
123
  else:
124
- text += ' ' + sentence
125
  display(HTML(f""" {text} """))
126
 
127
  output = ''
128
  best_sentences = []
129
- for sentence in output:
130
  #print(sentence)
131
- best_sentences.append(str(sentence))
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