Kaushik Bar
commited on
Commit
β’
15e8a30
1
Parent(s):
69dadd3
zsic
Browse files- .gitignore +1 -0
- app.py +4 -11
- examples/{test1/1.jpg β 1.jpg} +0 -0
- examples/{test1/2.JPG β 2.JPG} +0 -0
- examples/{test1/3.jpg β 3.jpg} +0 -0
- examples/{test1/4.JPG β 4.JPG} +0 -0
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
*.bk
|
app.py
CHANGED
@@ -3,10 +3,6 @@ from transformers import pipeline
|
|
3 |
import numpy as np
|
4 |
from PIL import Image
|
5 |
|
6 |
-
test1_labels = "me lill;;general store;;goods;;nike;;bags;;shoe;;apparel store;;48 hours sale;;shoes;;8.8;;roadmate;;multi brand outlet;;shoe store;;find your way;;bag shop;;mall;;ralph lauren;;adidas originals;;single luxury;;flat 50%;;kailasa;;yy sports;;sale upto 50%;;laurel;;converse;;pony;;store;;kappa;;glamshops;;grocery store;;fruits;;orefici;;sale;;vans;;convienence store;;met;;yy;;grocery;;milano;;Fresh eggs;;multi brand luxury;;reebok;;bombay electric;;cloth;;manequin;;delhi electric;;lee;;caps;;zara;;crocs;;pepe jenes;;adidas;;sandals;;napa;;project x;;asics;;niche fashion;;puma;;yonex;;t-shirt;;macys;;adidas shoes;;cloth store;;le mill;;sweet monster;;shirt store;;shirt"
|
7 |
-
|
8 |
-
test2_labels = "Bata;;Tiger;;Mevious;;ministreet;;Bagong;;pepsi;;Persian Cat;;Nike;;birds;;Chesterfield;;Parcel;;Adidas;;American Express;;lions;;Ciggerete;;Puma;;xyz;;Truck;;Good food;;square one;;Courier;;Cat;;circle one;;Cignal;;Classic;;No Face masks no entry;;open;;Ciggerate;;Pall Mall;;Fortune;;Winston;;Fed Express;;Chefs Bakery;;Chefs Kitchen;;RC;;Leapard;;Dog;;JTI;;Bakery;;sophie store;;Cheetah;;mini street 27;;Hygenic;;coca cola;;Marvel;;abc;;dogs;;Malboro;;chef jhez kitchen marife patiag;;Sphynix Cat;;cats;;British American Tobacco;;BAT;;Fed Ex;;mini street convenience store albert josephparren;;Absolute;;Dunhill"
|
9 |
-
|
10 |
pipe = pipeline("zero-shot-image-classification", model="openai/clip-vit-base-patch32")
|
11 |
|
12 |
def shot(image, labels_text):
|
@@ -21,13 +17,10 @@ iface = gr.Interface(shot,
|
|
21 |
["image", "text"],
|
22 |
"label",
|
23 |
examples=[
|
24 |
-
["examples/
|
25 |
-
["examples/
|
26 |
-
["examples/
|
27 |
-
["examples/
|
28 |
-
|
29 |
-
#["examples/test2/1.jpg", test2_labels],
|
30 |
-
#["examples/test2/2.jpg", test2_labels],
|
31 |
],
|
32 |
description="Add a picture and a list of labels separated by ;;",
|
33 |
title="Zero-shot Image Classification")
|
|
|
3 |
import numpy as np
|
4 |
from PIL import Image
|
5 |
|
|
|
|
|
|
|
|
|
6 |
pipe = pipeline("zero-shot-image-classification", model="openai/clip-vit-base-patch32")
|
7 |
|
8 |
def shot(image, labels_text):
|
|
|
17 |
["image", "text"],
|
18 |
"label",
|
19 |
examples=[
|
20 |
+
["examples/1.jpg", "ralph lauren;;apparel store;;ralph lauren store;;shirts;;wardrobe;;white flower"],
|
21 |
+
["examples/2.JPG", "adidas;;apparel store;;adidas store;;shirts;;wardrobe;;women training;;shoes"],
|
22 |
+
["examples/3.jpg", "project x;;sweet monster;;bags store;;store;;shoes store;;glass windows;;hanging lights"],
|
23 |
+
["examples/4.JPG", "multi brand store;;multi brand shoe store;;shoe store;;mannequins;;adidas store;;reebok store;;puma store"],
|
|
|
|
|
|
|
24 |
],
|
25 |
description="Add a picture and a list of labels separated by ;;",
|
26 |
title="Zero-shot Image Classification")
|
examples/{test1/1.jpg β 1.jpg}
RENAMED
File without changes
|
examples/{test1/2.JPG β 2.JPG}
RENAMED
File without changes
|
examples/{test1/3.jpg β 3.jpg}
RENAMED
File without changes
|
examples/{test1/4.JPG β 4.JPG}
RENAMED
File without changes
|