File size: 538 Bytes
54f2886 c756e3d 54f2886 c756e3d 54f2886 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import gradio as gr
def classify(img):
pred, probability = predict_one_image(img, model_VGG19)
return class_names[pred]
demo = gr.Interface(fn=classify,
inputs = gr.inputs.Image(shape=(224,224)),
outputs =gr.outputs.Textbox(),
title = "Flower Recognition",
examples =['tulip.jpg','rose.jpg','daisy.jpg','dandelion.jpg','sunflower.jpg',],
description = "Transfer Learning Application",
allow_flagging = "never"
).launch(inbrowser=True) |