Spaces:
Runtime error
Runtime error
File size: 359 Bytes
281a83a a46de96 281a83a 4856a73 a46de96 0265339 a46de96 281a83a d75abc9 a46de96 281a83a |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import gradio as gr
from fastai.vision.all import *
def is_cat(x):
return x[0].isupper()
def classifier(img):
categories = ('Perro','Gato')
pred,indexs,probs = learner.predict(img)
return dict(zip(categories,map(float,probs)))
learner = load_learner('cats.pkl')
demo = gr.Interface(fn=classifier, inputs="image", outputs="label")
demo.launch() |