Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| from transformers import pipeline | |
| clf = pipeline("image-classification", model="PR0G3T/vit-beans-finetuned") | |
| def infer(img): | |
| return clf(img)[0]["label"] | |
| gr.Interface( | |
| fn=infer, | |
| inputs=gr.Image(type="pil"), | |
| outputs="label", | |
| title="Beans Leaf Classifier" | |
| ).launch() | |