Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,17 @@ def predict(img):
|
|
14 |
img = PILImage.create(img)
|
15 |
pred,pred_idx,probs = learn.predict(img)
|
16 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
# Creamos la interfaz y la lanzamos.
|
19 |
-
gr.Interface(fn=predict, inputs=gr.inputs.Image(shape=(320, 320)), outputs=gr.outputs.Label(num_top_classes=5),examples=['f576e45d1da2.png','1df0a4c23c95.png']).launch(share=False)
|
20 |
|
|
|
14 |
img = PILImage.create(img)
|
15 |
pred,pred_idx,probs = learn.predict(img)
|
16 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
17 |
+
|
18 |
+
# Establecemos el título de la App y también indicamos
|
19 |
+
title = "Blindness Classifier"
|
20 |
+
description = "A Diabetic Retinopathy disease (DR) classifier trained on a Retine Image dataset with fastai. It classifies 5 degrees in the advance of the disease ranging from: 0 - No DR, 1 - Mild DR, 2 - Moderate DR, 3 - Severe DR and 4 - Proliferative DR"
|
21 |
+
|
22 |
+
0 - No presenta Retinopatía Diabética (DR)
|
23 |
+
1 - DR Suave
|
24 |
+
2 - DR Moderada
|
25 |
+
3 - DR Severa
|
26 |
+
4 - DR Proliferativa
|
27 |
+
|
28 |
# Creamos la interfaz y la lanzamos.
|
29 |
+
gr.Interface(fn=predict, inputs=gr.inputs.Image(shape=(320, 320)), outputs=gr.outputs.Label(num_top_classes=5), title=title, description=description, examples=['f576e45d1da2.png','1df0a4c23c95.png']).launch(share=False)
|
30 |
|