flowers / app.py
andriydovgal's picture
Upload folder using huggingface_hub
46d8015
raw
history blame contribute delete
631 Bytes
import gradio as gr
from transformers import pipeline
pipe = pipeline("image-classification", "dima806/oxford_flowers_image_detection")
def classifier(image):
return pipe(image)
gr.close_all()
demo = gr.Interface(fn=classifier,
inputs=[gr.Image(label="Upload image", type="pil")],
outputs=[gr.Textbox(label="Evaluation results")],
title="Flowers Classification MVP",
description="Classification flowers image based on Flower Datasets (https://www.robots.ox.ac.uk/~vgg/data/flowers/)",
allow_flagging="never")
demo.launch()