Spaces:
Runtime error
Runtime error
Updated metrics
Browse files
app.py
CHANGED
|
@@ -12,9 +12,9 @@ def allure(image, gender):
|
|
| 12 |
gender = gender.lower()
|
| 13 |
image = preprocess(image).unsqueeze(0).to(device)
|
| 14 |
positive_terms = [f'a hot {gender}',
|
| 15 |
-
f'a beautiful {gender}', f'an alluring {gender}', 'a photorealistic
|
| 16 |
negative_terms = [f'a gross {gender}',
|
| 17 |
-
f'an ugly {gender}', f'a hideous {gender}', '
|
| 18 |
|
| 19 |
pairs = list(zip(positive_terms, negative_terms))
|
| 20 |
|
|
@@ -105,7 +105,7 @@ with gr.Interface(
|
|
| 105 |
gr.Markdown(
|
| 106 |
"""The input image is passed to OpenAI's CLIP image captioning model and evaluated for how much it conforms to the model's idea of hotness, beauty, and attractiveness.
|
| 107 |
These values are then combined to produce a composite score on a scale of 0 to 100.
|
| 108 |
-
# ⚠️ WARNING: This is meant solely for educational use
|
| 109 |
|
| 110 |
iface.queue() # Add `api_open = False` to disable direct API access.
|
| 111 |
iface.launch()
|
|
|
|
| 12 |
gender = gender.lower()
|
| 13 |
image = preprocess(image).unsqueeze(0).to(device)
|
| 14 |
positive_terms = [f'a hot {gender}',
|
| 15 |
+
f'a beautiful {gender}', f'an alluring {gender}', 'a photorealistic image']
|
| 16 |
negative_terms = [f'a gross {gender}',
|
| 17 |
+
f'an ugly {gender}', f'a hideous {gender}', 'a photoshopped image']
|
| 18 |
|
| 19 |
pairs = list(zip(positive_terms, negative_terms))
|
| 20 |
|
|
|
|
| 105 |
gr.Markdown(
|
| 106 |
"""The input image is passed to OpenAI's CLIP image captioning model and evaluated for how much it conforms to the model's idea of hotness, beauty, and attractiveness.
|
| 107 |
These values are then combined to produce a composite score on a scale of 0 to 100.
|
| 108 |
+
# ⚠️ WARNING: This is meant solely for educational use!""")
|
| 109 |
|
| 110 |
iface.queue() # Add `api_open = False` to disable direct API access.
|
| 111 |
iface.launch()
|