Spaces:
Runtime error
Runtime error
from fastai.vision.all import * | |
import gradio as gr | |
learner_madness = load_learner('madness.pkl') | |
categories = ['Hank', 'Tricky', 'Deimos', "Jeb", 'Sanford', 'The Auditor'] | |
def classify_madness(img): | |
prediction, index, probability = learner_madness.predict(img) | |
return dict(zip(categories, map(float, probability))) | |
intf = gr.Interface(fn=classify_madness, | |
inputs=gr.Image(shape=(192, 192)), | |
outputs=gr.Label(), | |
examples=[]) | |
intf.launch(inline=False) | |