Update app.py
Browse files
app.py
CHANGED
@@ -277,18 +277,22 @@ for i in range(0, 5):
|
|
277 |
highlighted_sentence = paraphrases[i]
|
278 |
highlighted_text = []
|
279 |
|
280 |
-
#
|
281 |
-
|
282 |
-
|
|
|
|
|
283 |
highlighted_sentence = highlighted_sentence.replace(substring, f'<span style="background-color: {color}; color: white;">{substring}</span>')
|
284 |
highlighted_text.append(substring)
|
285 |
|
286 |
highlighted_sentence_list.append(highlighted_sentence)
|
287 |
|
288 |
-
st.markdown("
|
289 |
for sentence in highlighted_sentence_list:
|
290 |
st.write(sentence, unsafe_allow_html=True)
|
291 |
|
|
|
|
|
292 |
|
293 |
|
294 |
|
|
|
277 |
highlighted_sentence = paraphrases[i]
|
278 |
highlighted_text = []
|
279 |
|
280 |
+
# Assign a unique color to each paraphrase
|
281 |
+
color = colors[i % len(colors)]
|
282 |
+
|
283 |
+
# Iterate over substrings and apply the color
|
284 |
+
for substring in combined_words_list[i]:
|
285 |
highlighted_sentence = highlighted_sentence.replace(substring, f'<span style="background-color: {color}; color: white;">{substring}</span>')
|
286 |
highlighted_text.append(substring)
|
287 |
|
288 |
highlighted_sentence_list.append(highlighted_sentence)
|
289 |
|
290 |
+
st.markdown("\nHighlighted Paraphrase Sentences with LCS:")
|
291 |
for sentence in highlighted_sentence_list:
|
292 |
st.write(sentence, unsafe_allow_html=True)
|
293 |
|
294 |
+
st.write(sentence, unsafe_allow_html=True)
|
295 |
+
|
296 |
|
297 |
|
298 |
|