PedroMartelleto commited on
Commit
78b0316
1 Parent(s): 7d550ac

Deploying to HF

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -115,7 +115,13 @@ def create_model_from_checkpoint():
115
  model = create_model_from_checkpoint()
116
  labels = [ "benign", "malignant", "normal" ]
117
 
118
- def predict(img, shap_samples, shap_stdevs, occlusion_stride, occlusion_window):
 
 
 
 
 
 
119
  explainer = Explainer(model, img, labels)
120
  return [explainer.confidences,
121
  explainer.shap(shap_samples, shap_stdevs),
 
115
  model = create_model_from_checkpoint()
116
  labels = [ "benign", "malignant", "normal" ]
117
 
118
+ def predict(gr_inputs):
119
+ img = gr_inputs[0]
120
+ shap_samples = gr_inputs[1]
121
+ shap_stdevs = gr_inputs[2]
122
+ occlusion_stride = gr_inputs[3]
123
+ occlusion_window = gr_inputs[4]
124
+
125
  explainer = Explainer(model, img, labels)
126
  return [explainer.confidences,
127
  explainer.shap(shap_samples, shap_stdevs),