Spaces:
Sleeping
Sleeping
meghanaraok
commited on
Commit
•
5255e83
1
Parent(s):
9896aa9
Update app.py
Browse files
app.py
CHANGED
@@ -170,7 +170,7 @@ def predict_icd(text_input, model_name, label_count):
|
|
170 |
|
171 |
html_output ="<h2>ICD Codes</h2>"
|
172 |
for label, title in predicted_labels_with_titles:
|
173 |
-
color = hash_to_color(label)
|
174 |
html_output += f"<div style='background-color: {color}; padding: 5px; margin-bottom: 5px;'>{label} - {title} <span style='float:right;'>{label_probabilities[label]:.2f}%</span></div>"
|
175 |
|
176 |
|
|
|
170 |
|
171 |
html_output ="<h2>ICD Codes</h2>"
|
172 |
for label, title in predicted_labels_with_titles:
|
173 |
+
color = hash_to_color(str(label))
|
174 |
html_output += f"<div style='background-color: {color}; padding: 5px; margin-bottom: 5px;'>{label} - {title} <span style='float:right;'>{label_probabilities[label]:.2f}%</span></div>"
|
175 |
|
176 |
|