Spaces:
Runtime error
Runtime error
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() |