misza222's picture
Update app.py
809f2cc
raw history blame
No virus
386 Bytes
import gradio as gr
from fastcore.all import *
learner_inf = load_learner('baltrishkes.pkl')
def predict(img):
img = PILImage.create(img)
pred,pred_idx,probs = learner_inf.predict(img)
return pred
gr.Interface(fn=predict,
inputs=gr.inputs.Image(shape=(512, 512)),
outputs=gr.outputs.Label(),
interpretation="default").launch()