Spaces:
Sleeping
Sleeping
File size: 335 Bytes
091d51a 8819004 091d51a 8819004 091d51a 8819004 091d51a |
1 2 3 4 5 6 7 8 9 10 11 |
import gradio as gr
from fastai.vision.all import *
learn = load_learner('./tree-classifier.pkl')
def predict(image):
leaf_type,_,probs = learn.predict(image)
return f"This is a: {leaf_type}. \nProbability it's a {leaf_type}: {probs.max():.4f}"
iface = gr.Interface(fn=predict, inputs="image", outputs="text")
iface.launch() |