Spaces:
Runtime error
Runtime error
Update app.py
Browse filesupdated coloring rules
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 |
-
|
|
|
|
|
|
|
|
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)
|