Spaces:
Runtime error
Runtime error
import gradio as gr | |
from transformers import pipeline | |
pipe = pipeline(task="image-classification", model="SuperSecureHuman/Flower-CNN") | |
class_names = ['daisy', 'dandelion', 'roses', 'sunflowers', 'tulips'] | |
image = gr.inputs.Image(shape=(300,300)) | |
label = gr.outputs.Label(num_top_classes=5) | |
gr.Interface.from_pipeline(pipe, | |
title="Flower Classification", | |
description="Flower CNN", | |
inputs = image, | |
outputs = label, | |
live=True, | |
allow_flagging="never").launch() |