File size: 444 Bytes
8776bb2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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()