Spaces:
Build error
Build error
Commit
·
e17785f
1
Parent(s):
253ce6a
statements & theme. in line with other repo.
Browse files
app.py
CHANGED
@@ -39,10 +39,11 @@ def compute_textual_similarity(caption, statement):
|
|
39 |
|
40 |
# List of statements for Image-Text Matching
|
41 |
statements = [
|
42 |
-
"cartoon, figurine, or toy",
|
43 |
"appears to be for children",
|
44 |
"includes children",
|
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 depicts Santa Claus",
|
48 |
'promotes alcohol use as a "rite of passage" to adulthood',
|
@@ -56,9 +57,8 @@ statements = [
|
|
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
|
@@ -130,7 +130,7 @@ iface = gr.Interface(
|
|
130 |
inputs=image_input,
|
131 |
outputs=output,
|
132 |
title="Image Captioning and Image-Text Matching",
|
133 |
-
theme='
|
134 |
css=".output { flex-direction: column; } .output .outputs { width: 100%; }" # Custom CSS
|
135 |
)
|
136 |
|
|
|
39 |
|
40 |
# List of statements for Image-Text Matching
|
41 |
statements = [
|
42 |
+
"contains or features a cartoon, figurine, or toy",
|
43 |
"appears to be for children",
|
44 |
"includes children",
|
45 |
+
"sexual",
|
46 |
+
"nudity",
|
47 |
"depicts a child or portrays objects, images, or cartoon figures that primarily appeal to persons below the legal purchase age",
|
48 |
"uses the name of or depicts Santa Claus",
|
49 |
'promotes alcohol use as a "rite of passage" to adulthood',
|
|
|
57 |
"relies upon sexual prowess or sexual success as a selling point for the brand",
|
58 |
"uses graphic or gratuitous nudity, overt sexual activity, promiscuity, or sexually lewd or indecent images or language",
|
59 |
"associates with anti-social or dangerous behavior",
|
60 |
+
"depicts illegal activity of any kind",
|
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
|
|
|
130 |
inputs=image_input,
|
131 |
outputs=output,
|
132 |
title="Image Captioning and Image-Text Matching",
|
133 |
+
theme='sudeepshouche/minimalist',
|
134 |
css=".output { flex-direction: column; } .output .outputs { width: 100%; }" # Custom CSS
|
135 |
)
|
136 |
|