Kaushik Bar
commited on
Commit
•
6828757
1
Parent(s):
8076002
zsic
Browse files- app.py +4 -3
- examples/test1/3.jpg +0 -0
- examples/test1/4.JPG +0 -0
app.py
CHANGED
@@ -14,8 +14,7 @@ def shot(image, labels_text):
|
|
14 |
labels = labels_text.split(";;")
|
15 |
res = pipe(images=PIL_image,
|
16 |
candidate_labels=labels,
|
17 |
-
hypothesis_template="This is a photo of {}"
|
18 |
-
multi_label=True)
|
19 |
return {dic["label"]: dic["score"] for dic in res}
|
20 |
|
21 |
iface = gr.Interface(shot,
|
@@ -23,7 +22,9 @@ iface = gr.Interface(shot,
|
|
23 |
"label",
|
24 |
examples=[
|
25 |
["examples/test1/1.jpg", "ralph lauren;;apparel store;;ralph lauren store;;shirts;;wardrobe;;white flower"],
|
26 |
-
["examples/test1/2.
|
|
|
|
|
27 |
|
28 |
#["examples/test2/1.jpg", test2_labels],
|
29 |
#["examples/test2/2.jpg", test2_labels],
|
|
|
14 |
labels = labels_text.split(";;")
|
15 |
res = pipe(images=PIL_image,
|
16 |
candidate_labels=labels,
|
17 |
+
hypothesis_template="This is a photo of {}")
|
|
|
18 |
return {dic["label"]: dic["score"] for dic in res}
|
19 |
|
20 |
iface = gr.Interface(shot,
|
|
|
22 |
"label",
|
23 |
examples=[
|
24 |
["examples/test1/1.jpg", "ralph lauren;;apparel store;;ralph lauren store;;shirts;;wardrobe;;white flower"],
|
25 |
+
["examples/test1/2.jpg", "adidas;;apparel store;;adidas store;;shirts;;wardrobe;;women training;;shoes"],
|
26 |
+
["examples/test1/3.jpg", "project x;;sweet monster;;bags store;;glass windows;;hanging lights"],
|
27 |
+
["examples/test1/4.jpg", "multi brand store;;multi brand shoe store;;shoe store;;mannequins;;adidas store;;reebok store;;puma store"],
|
28 |
|
29 |
#["examples/test2/1.jpg", test2_labels],
|
30 |
#["examples/test2/2.jpg", test2_labels],
|
examples/test1/3.jpg
ADDED
examples/test1/4.JPG
ADDED