Spaces:
Runtime error
Runtime error
Commit
·
8076b08
1
Parent(s):
e336517
Update app.py
Browse files
app.py
CHANGED
@@ -2,10 +2,8 @@ from transformers import pipeline
|
|
2 |
from turtle import title
|
3 |
import gradio as gr
|
4 |
from transformers import pipeline
|
5 |
-
import numpy as np
|
6 |
from PIL import Image
|
7 |
|
8 |
-
# More models in the model hub.
|
9 |
checkpoint = "openai/clip-vit-large-patch14-336"
|
10 |
classifier = pipeline("zero-shot-image-classification",
|
11 |
model=checkpoint)
|
@@ -23,10 +21,10 @@ interface = gr.Interface(shot,
|
|
23 |
inputs=["image", "text"],
|
24 |
outputs="label",
|
25 |
description="Add a picture and a list of labels separated by commas",
|
26 |
-
examples=[[
|
27 |
-
['interior.jpeg',
|
28 |
-
['carplay.webp',
|
29 |
-
]
|
30 |
title="Zero-shot Image Classification")
|
31 |
|
32 |
interface.launch()
|
|
|
2 |
from turtle import title
|
3 |
import gradio as gr
|
4 |
from transformers import pipeline
|
|
|
5 |
from PIL import Image
|
6 |
|
|
|
7 |
checkpoint = "openai/clip-vit-large-patch14-336"
|
8 |
classifier = pipeline("zero-shot-image-classification",
|
9 |
model=checkpoint)
|
|
|
21 |
inputs=["image", "text"],
|
22 |
outputs="label",
|
23 |
description="Add a picture and a list of labels separated by commas",
|
24 |
+
examples=[["tundra.jpg", "Ford F-150, RAM 1500, GMC Sierra, Silverado"],
|
25 |
+
['interior.jpeg', "Interior, Exterior"],
|
26 |
+
['carplay.webp', "Carplay, Android play"]
|
27 |
+
],
|
28 |
title="Zero-shot Image Classification")
|
29 |
|
30 |
interface.launch()
|