# AUTOGENERATED! DO NOT EDIT! File to edit: app.ipynb. # %% auto 0 __all__ = ['learn', 'image', 'label', 'examples', 'intf', 'is_cat'] # %% app.ipynb 2 import fastbook fastbook.setup_book() # %% app.ipynb 3 from fastbook import * from fastai.vision.widgets import * from fastai.vision.all import * from urllib.request import urlopen # %% app.ipynb 5 import gradio as gr def is_cat(x): return x[0].issuper() # %% app.ipynb 11 learn = load_learner('model.pkl') # %% app.ipynb 16 image = gr.inputs.Image(shape=(192,192)) label = gr.outputs.Label() examples = ['images/4d3b88ed-d0dc-43ec-bbaf-6babf6f310a7.jpg', 'images/5c283719-addd-4dbf-9847-eda74d0af8e7.jpg'] intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples) intf.launch(inline=False)