karimouda commited on
Commit
b2571d8
·
1 Parent(s): e5dace0
Files changed (1) hide show
  1. src/display/formatting.py +2 -2
src/display/formatting.py CHANGED
@@ -8,9 +8,9 @@ def make_clickable_model(model_name):
8
 
9
  def make_contamination_red(contamination_score):
10
  if contamination_score <=0:
11
- return f"<span style='background-color:green;padding:5px;color: white; text-align: center;margin:0px' title='Clean model!'>{round((contamination_score))}</span>"
12
  else:
13
- return f"<span style='background-color:red;padding:5px;color: white; text-align: center;margin:0px' title='Contaminated model!'>{round((contamination_score),2)}</span>"
14
 
15
  def styled_error(error):
16
  return f"<p style='color: red; font-size: 20px; text-align: center;'>{error}</p>"
 
8
 
9
  def make_contamination_red(contamination_score):
10
  if contamination_score <=0:
11
+ return f"<span style='display: block;background-color:green;padding:5px;color: white; text-align: center;margin:0px' title='Clean model!'>{round((contamination_score))}</span>"
12
  else:
13
+ return f"<span style='display: block;background-color:red;padding:5px;color: white; text-align: center;margin:0px' title='Contaminated model!'>{round((contamination_score),2)}</span>"
14
 
15
  def styled_error(error):
16
  return f"<p style='color: red; font-size: 20px; text-align: center;'>{error}</p>"