Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,11 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
-
|
4 |
images = ["images/daisy.jpg", "images/dandelion.jpg", "images/rosa.jpg", "images/sunflower.jpg", "images/tulip.jpg"]
|
5 |
|
6 |
-
iface = gr.Interface(
|
7 |
-
|
8 |
-
inputs = gr.Image(label="Upload Image"),
|
9 |
-
outputs = gr.Textbox(),
|
10 |
examples= [ [example] for example in images],
|
11 |
description="Daisy, Dandelion, Rose, Sonflower, Tulip",
|
12 |
title="FLower Classifier - Vit"
|
|
|
1 |
import gradio as gr
|
2 |
+
from transformers import pipeline
|
3 |
|
4 |
+
pipe = pipeline("image-classification", model="manoh2f2/finetuned-vit-flowers")
|
5 |
images = ["images/daisy.jpg", "images/dandelion.jpg", "images/rosa.jpg", "images/sunflower.jpg", "images/tulip.jpg"]
|
6 |
|
7 |
+
iface = gr.Interface.from_pipeline(
|
8 |
+
pipe,
|
|
|
|
|
9 |
examples= [ [example] for example in images],
|
10 |
description="Daisy, Dandelion, Rose, Sonflower, Tulip",
|
11 |
title="FLower Classifier - Vit"
|