pedrobouzon commited on
Commit
479379a
·
1 Parent(s): dbd74c1

fix title and remove absent values from the figure

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -136,11 +136,18 @@ def predict(image, age, region, cancer_history, skin_cancer_history, bleed, hurt
136
  accumulated_features = {}
137
 
138
  for step_name, new_features in steps:
 
 
 
 
 
 
 
 
139
  steps_labels.append(step_name)
140
  accumulated_features.update(new_features)
141
 
142
  metadata_vector = np.zeros(len(_metadata_columns), dtype=np.float32)
143
-
144
  if "age" in accumulated_features and accumulated_features["age"] is not None:
145
  if "age" in _metadata_columns:
146
  val = accumulated_features["age"]
@@ -183,7 +190,7 @@ def clear_func():
183
 
184
  with gr.Blocks() as demo:
185
  with gr.Row():
186
- gr.Markdown("# PRISM: A Clinically Interpretable Stepwise Framework for Multimodal Skin Cancer Diagnosis (DOI: TODO)")
187
 
188
  with gr.Row():
189
  with gr.Column():
 
136
  accumulated_features = {}
137
 
138
  for step_name, new_features in steps:
139
+ skip_feature = False
140
+ for key, value in new_features.items():
141
+ # I had to add this ugly "None" option in the select ;/
142
+ if value == "None" or value is None or value == []:
143
+ skip_feature = True
144
+
145
+ if skip_feature:
146
+ continue
147
  steps_labels.append(step_name)
148
  accumulated_features.update(new_features)
149
 
150
  metadata_vector = np.zeros(len(_metadata_columns), dtype=np.float32)
 
151
  if "age" in accumulated_features and accumulated_features["age"] is not None:
152
  if "age" in _metadata_columns:
153
  val = accumulated_features["age"]
 
190
 
191
  with gr.Blocks() as demo:
192
  with gr.Row():
193
+ gr.Markdown("# PRISM: A Clinically Interpretable Stepwise Framework for Multimodal Skin Cancer Diagnosis")
194
 
195
  with gr.Row():
196
  with gr.Column():