Spaces:
Runtime error
Runtime error
!pip install Pillow | |
from fastai.vision.all import * | |
import gradio as gr | |
label = ['Cancer', 'No Cancer'] | |
def classificador(im): | |
pred,idx,probs = learn.predict(im) | |
return dict(zip(label, map(float, probs))) | |
imatge = gr.inputs.Image(shape=(192,192)) | |
label = gr.outputs.Label() | |
intf = gr.Interface(fn=classificador, inputs = imatge, outputs = label) | |
intf.launch(inline=False) |