import gradio as gr | |
from fastai.vision.all import * | |
import skimage | |
learn = load_learner('model.pkl') | |
labels = learn.dls.vocab | |
title = "Lesson 4" | |
interpretation='default' | |
enable_queue=True | |
gr.Interface(fn=predict,inputs=gr.inputs.Image(shape=(512, 512)),outputs=gr.outputs.Label(num_top_classes=5),title=title,examples=examples,interpretation=interpretation,enable_queue=enable_queue).launch() | |
iface = gr.Interface(fn=learn) | |
iface.launch() |