Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
def classify(img):
|
| 4 |
+
pred, probability = predict_one_image(img, model_VGG19)
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
demo = gr.Interface(fn=classify,
|
| 8 |
+
inputs = gr.inputs.Image(shape=(224,224)),
|
| 9 |
+
outputs =gr.outputs.Label(num_classes=5),
|
| 10 |
+
title = "Flower Recognition",
|
| 11 |
+
examples =['tulip.jpg','rose.jpg','daisy.jpg','dandelion.jpg','sunflower.jpg',],
|
| 12 |
+
description = "Transfer Learning Application",
|
| 13 |
+
allow_flagging = "never"
|
| 14 |
+
).launch(inbrowser=True)
|