np.float bug
Browse files
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(
|