jethrovic commited on
Commit
98dadb2
·
1 Parent(s): d587dd1

Update app.py

Browse files

updated coloring rules

Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -30,6 +30,9 @@ if text:
30
  highlighted_text = ""
31
  for word_info in pos_result:
32
  color = get_color(word_info["entity_group"])
33
- highlighted_text += f'<span style="color:{color};">{word_info["word"]}</span> '
34
 
35
- st.markdown(highlighted_text, unsafe_allow_html=True)
 
 
 
 
30
  highlighted_text = ""
31
  for word_info in pos_result:
32
  color = get_color(word_info["entity_group"])
33
+ highlighted_text += f'<span style="color: {color};">{word_info["word"]}</span> '
34
 
35
+ # Debug: Print the highlighted text to inspect the HTML
36
+ print(highlighted_text)
37
+
38
+ st.markdown(highlighted_text, unsafe_allow_html=True)