Towhidul commited on
Commit
42396bd
1 Parent(s): 35c17fa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -277,18 +277,22 @@ for i in range(0, 5):
277
  highlighted_sentence = paraphrases[i]
278
  highlighted_text = []
279
 
280
- # Iterate over substrings and apply different colors
281
- for j, substring in enumerate(combined_words_list[i]):
282
- color = colors[j % len(colors)] # Cycle through colors
 
 
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("**\nHighlighted Paraphrase Sentences with LCS:**")
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