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) |