misza222's picture
app
f33e051
raw history blame
No virus
380 Bytes
import gradio as gr
from fastai 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()