Spaces:
Build error
Build error
Hussain Shaikh
commited on
Commit
·
6857df8
1
Parent(s):
59b068a
added images
Browse files- app.py +5 -4
- profile.jpg +0 -0
- sign.png +0 -0
app.py
CHANGED
@@ -8,7 +8,7 @@ from PIL import Image
|
|
8 |
pipe = pipeline("zero-shot-image-classification", model="openai/clip-vit-base-patch32")
|
9 |
images="dog.jpg"
|
10 |
|
11 |
-
def shot(image, labels_text="signature,
|
12 |
PIL_image = Image.fromarray(np.uint8(image)).convert('RGB')
|
13 |
labels = labels_text.split(",")
|
14 |
res = pipe(images=PIL_image,
|
@@ -18,8 +18,9 @@ def shot(image, labels_text="signature,profile picture"):
|
|
18 |
|
19 |
iface = gr.Interface(shot,
|
20 |
"image",
|
21 |
-
"label",
|
22 |
-
|
23 |
-
|
|
|
24 |
|
25 |
iface.launch()
|
|
|
8 |
pipe = pipeline("zero-shot-image-classification", model="openai/clip-vit-base-patch32")
|
9 |
images="dog.jpg"
|
10 |
|
11 |
+
def shot(image, labels_text="signature,passport photo"):
|
12 |
PIL_image = Image.fromarray(np.uint8(image)).convert('RGB')
|
13 |
labels = labels_text.split(",")
|
14 |
res = pipe(images=PIL_image,
|
|
|
18 |
|
19 |
iface = gr.Interface(shot,
|
20 |
"image",
|
21 |
+
"label",
|
22 |
+
examples=[["profile.jpg"],["sign.png"]],
|
23 |
+
description="Add a picture",
|
24 |
+
title="Sign Image Classification")
|
25 |
|
26 |
iface.launch()
|
profile.jpg
ADDED
![]() |
sign.png
ADDED
![]() |