Spaces:
Build error
Build error
brianjking
commited on
Commit
•
cfcf949
1
Parent(s):
5c5800a
Update app.py
Browse files
app.py
CHANGED
@@ -39,26 +39,26 @@ def compute_textual_similarity(caption, statement):
|
|
39 |
|
40 |
# List of statements for Image-Text Matching
|
41 |
statements = [
|
42 |
-
"cartoon, figurine, or toy",
|
43 |
-
"
|
44 |
-
"
|
45 |
-
"
|
46 |
-
"depicts a child or portrays objects, images, or cartoon figures that primarily appeal to persons below the legal purchase age",
|
47 |
-
"uses the name of or
|
48 |
'promotes alcohol use as a "rite of passage" to adulthood',
|
49 |
-
"uses brand identification—including logos, trademarks, or names—on clothing, toys, games, game equipment, or other items intended for use primarily by persons below the legal purchase age",
|
50 |
"portrays persons in a state of intoxication or in any way suggests that intoxication is socially acceptable conduct",
|
51 |
-
"makes curative or therapeutic claims
|
52 |
"makes claims or representations that individuals can attain social, professional, educational, or athletic success or status due to beverage alcohol consumption",
|
53 |
"degrades the image, form, or status of women, men, or of any ethnic group, minority, sexual orientation, religious affiliation, or other such group?",
|
54 |
"uses lewd or indecent images or language",
|
55 |
-
"employs religion or religious themes
|
56 |
"relies upon sexual prowess or sexual success as a selling point for the brand",
|
57 |
"uses graphic or gratuitous nudity, overt sexual activity, promiscuity, or sexually lewd or indecent images or language",
|
58 |
"associates with anti-social or dangerous behavior",
|
59 |
"depicts illegal activity of any kind?",
|
|
|
60 |
'uses the term "spring break" or sponsors events or activities that use the term "spring break," unless those events or activities are located at a licensed retail establishment',
|
61 |
-
"baseball",
|
62 |
]
|
63 |
|
64 |
# Function to compute ITM scores for the image-statement pair
|
@@ -128,7 +128,6 @@ iface = gr.Interface(
|
|
128 |
inputs=image_input,
|
129 |
outputs=output,
|
130 |
title="Image Captioning and Image-Text Matching",
|
131 |
-
theme='freddyaboulton/dracula_revamped',
|
132 |
css=".output { flex-direction: column; } .output .outputs { width: 100%; }" # Custom CSS
|
133 |
)
|
134 |
|
|
|
39 |
|
40 |
# List of statements for Image-Text Matching
|
41 |
statements = [
|
42 |
+
"contains a cartoon, figurine, or toy",
|
43 |
+
"is for children",
|
44 |
+
"children",
|
45 |
+
"sexual",
|
46 |
+
"depicts a child or portrays objects, images, or cartoon figures that primarily appeal to persons below the legal purchase age of alcohol",
|
47 |
+
"uses the name of or displays Santa Claus",
|
48 |
'promotes alcohol use as a "rite of passage" to adulthood',
|
49 |
+
"uses brand identification—including logos, trademarks, or names—on clothing, toys, games, game equipment, or other items intended for use primarily by persons below the legal purchase age of alcohol",
|
50 |
"portrays persons in a state of intoxication or in any way suggests that intoxication is socially acceptable conduct",
|
51 |
+
"makes curative or therapeutic claims",
|
52 |
"makes claims or representations that individuals can attain social, professional, educational, or athletic success or status due to beverage alcohol consumption",
|
53 |
"degrades the image, form, or status of women, men, or of any ethnic group, minority, sexual orientation, religious affiliation, or other such group?",
|
54 |
"uses lewd or indecent images or language",
|
55 |
+
"employs religion or religious themes",
|
56 |
"relies upon sexual prowess or sexual success as a selling point for the brand",
|
57 |
"uses graphic or gratuitous nudity, overt sexual activity, promiscuity, or sexually lewd or indecent images or language",
|
58 |
"associates with anti-social or dangerous behavior",
|
59 |
"depicts illegal activity of any kind?",
|
60 |
+
"illegal activity",
|
61 |
'uses the term "spring break" or sponsors events or activities that use the term "spring break," unless those events or activities are located at a licensed retail establishment',
|
|
|
62 |
]
|
63 |
|
64 |
# Function to compute ITM scores for the image-statement pair
|
|
|
128 |
inputs=image_input,
|
129 |
outputs=output,
|
130 |
title="Image Captioning and Image-Text Matching",
|
|
|
131 |
css=".output { flex-direction: column; } .output .outputs { width: 100%; }" # Custom CSS
|
132 |
)
|
133 |
|