mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-30 11:00:11 +08:00
2.4 KiB
2.4 KiB
Load the Model¶
In [1]:
%load_ext autoreload %autoreload 2 import numpy as np import tensorflow as tf import gradio
In [2]:
model = tf.keras.applications.inception_v3.InceptionV3()
In [5]:
inp = gradio.inputs.ImageUpload() out = gradio.outputs.Label(label_names='imagenet1000', max_label_length=8) io = gradio.Interface(inputs=inp, outputs=out, model=model, model_type='keras')
In [6]:
io.launch(inline=True, inbrowser=False, share=False, validate=False);
NOTE: Gradio is in beta stage, please report all bugs to: contact.gradio@gmail.com Model is running locally at: http://localhost:7862/ To create a public link, set `share=True` in the argument to `launch()`.