Spaces:
Runtime error
Runtime error
File size: 325 Bytes
0a23c34 84f8dc1 0a23c34 604dc93 0a23c34 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import gradio as gr
from fastai.vision.all import *
learn = load_learner("model.pkl")
categories = ["Bald Eagle", "Osprey"]
def classify(img):
pred,idx,probs = learn.predict(img)
return dict(zip(categories, map(float,probs)))
iface = gr.Interface(fn=classify, inputs="image", outputs="label")
iface.launch()
|