jschwaller commited on
Commit
d136104
·
verified ·
1 Parent(s): 16a2843

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -74,13 +74,13 @@ def main(prob1):
74
 
75
  # Define HTML for the legend
76
  legend_html = """
77
- <div style='margin-top: 20px;'>
78
  <h3>NER Legend</h3>
79
- <ul style='list-style-type:none;'>
80
  """
81
 
82
  for entity, color in entity_colors.items():
83
- legend_html += f"<li><span style='color:{color}; font-weight:bold;'>▉ </span>{entity}</li>"
84
 
85
  legend_html += "</ul></div>"
86
 
 
74
 
75
  # Define HTML for the legend
76
  legend_html = """
77
+ <div style='margin-top: 20px; color: white;'> <!-- Ensure the legend text is white for visibility -->
78
  <h3>NER Legend</h3>
79
+ <ul style='list-style-type:none; padding-left: 0;'> <!-- Remove padding from the list -->
80
  """
81
 
82
  for entity, color in entity_colors.items():
83
+ legend_html += f"<li><span style='color: white; background-color: {color}; padding: 5px 10px; margin-right: 5px; border-radius: 5px;'>{entity}</span></li>"
84
 
85
  legend_html += "</ul></div>"
86