Spaces:
Running
Running
starbotica
commited on
Commit
•
9bfcbab
1
Parent(s):
1de730f
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
|
|
2 |
from fastai.vision.all import *
|
3 |
import skimage
|
4 |
|
5 |
-
learn = load_learner('
|
6 |
|
7 |
labels = learn.dls.vocab
|
8 |
def predict(img):
|
@@ -10,17 +10,17 @@ def predict(img):
|
|
10 |
pred,pred_idx,probs = learn.predict(img)
|
11 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
12 |
|
13 |
-
title = "
|
14 |
|
15 |
description = """
|
16 |
Demostración creada por StarBótica
|
17 |
|
18 |
Academia de Nuevas Tecnologías en Sevilla
|
19 |
|
20 |
-
|
21 |
-
|
22 |
"""
|
23 |
interpretation='default'
|
24 |
enable_queue=True
|
25 |
|
26 |
-
gr.Interface(fn=predict,inputs=gr.inputs.Image(shape=(
|
|
|
2 |
from fastai.vision.all import *
|
3 |
import skimage
|
4 |
|
5 |
+
learn = load_learner('ciref.pkl')
|
6 |
|
7 |
labels = learn.dls.vocab
|
8 |
def predict(img):
|
|
|
10 |
pred,pred_idx,probs = learn.predict(img)
|
11 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
12 |
|
13 |
+
title = "Operado o no operado"
|
14 |
|
15 |
description = """
|
16 |
Demostración creada por StarBótica
|
17 |
|
18 |
Academia de Nuevas Tecnologías en Sevilla
|
19 |
|
20 |
+
Clasificador de imágenes con propósito demostrativo.
|
21 |
+
A partir de una topografía muestra la probabilidad de que el ojo haya sido sometido a cirugía refractiva o no.
|
22 |
"""
|
23 |
interpretation='default'
|
24 |
enable_queue=True
|
25 |
|
26 |
+
gr.Interface(fn=predict,inputs=gr.inputs.Image(shape=(744, 645)),outputs=gr.outputs.Label(num_top_classes=2),title=title,description=description,interpretation=interpretation,enable_queue=enable_queue).launch()
|