prova4
Browse files
app.py
CHANGED
|
@@ -17,9 +17,9 @@ def classify_image(img):
|
|
| 17 |
interp_img = interp.get_preds()[0]
|
| 18 |
return dict(zip(categories, map(float, probs))), interp_img
|
| 19 |
|
| 20 |
-
image = gr.inputs.Image(type=
|
| 21 |
label = gr.outputs.Label()
|
| 22 |
-
interpretation = gr.outputs.Image(label="Interpretation")
|
| 23 |
|
| 24 |
examples = [
|
| 25 |
['Cancer.png']
|
|
|
|
| 17 |
interp_img = interp.get_preds()[0]
|
| 18 |
return dict(zip(categories, map(float, probs))), interp_img
|
| 19 |
|
| 20 |
+
image = gr.inputs.Image(type="pil") # Especificar el tipo de imagen como 'pil'
|
| 21 |
label = gr.outputs.Label()
|
| 22 |
+
interpretation = gr.outputs.Image(label="Interpretation", type="numpy")
|
| 23 |
|
| 24 |
examples = [
|
| 25 |
['Cancer.png']
|