awsaf49 commited on
Commit
51b21f6
1 Parent(s): 479a02a

np.float bug

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -8,7 +8,7 @@ def predict_fn(image, model_name):
8
  model = getattr(gcvit, model_name)(pretrain=True)
9
  gradcam_model = get_gradcam_model(model)
10
  preds, overlay = get_gradcam_prediction(image, gradcam_model, cmap='jet', alpha=0.4, pred_index=None)
11
- preds = {x[1]:x[2] for x in preds}
12
  return [preds, overlay]
13
 
14
  demo = gr.Interface(
 
8
  model = getattr(gcvit, model_name)(pretrain=True)
9
  gradcam_model = get_gradcam_model(model)
10
  preds, overlay = get_gradcam_prediction(image, gradcam_model, cmap='jet', alpha=0.4, pred_index=None)
11
+ preds = {x[1]:float(x[2]) for x in preds}
12
  return [preds, overlay]
13
 
14
  demo = gr.Interface(