Spaces:
Sleeping
Sleeping
| 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() |