Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -15,13 +15,13 @@ model = CLIPModel.from_pretrained("openai/clip-vit-base-patch32")
|
|
15 |
processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32")
|
16 |
|
17 |
def get_mood_from_image(image: Image.Image):
|
18 |
-
moods = ["
|
19 |
|
20 |
# Create unique prompts for each mood
|
21 |
prompts = [
|
22 |
"The emotion conveyed by this image is fear. The person looks scared and tense.",
|
23 |
"The emotion conveyed by this image is anger. The person looks furious and irritated.",
|
24 |
-
"The emotion conveyed by this image is
|
25 |
"The emotion conveyed by this image is sadness. The person looks unhappy and gloomy.",
|
26 |
"The emotion conveyed by this image is disgust. The person looks repulsed and sickened.",
|
27 |
"The emotion conveyed by this image is surprise. The person looks astonished and amazed.",
|
|
|
15 |
processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32")
|
16 |
|
17 |
def get_mood_from_image(image: Image.Image):
|
18 |
+
moods = ["scared", "angry", "happy", "sad", "disgusted", "surprised"]
|
19 |
|
20 |
# Create unique prompts for each mood
|
21 |
prompts = [
|
22 |
"The emotion conveyed by this image is fear. The person looks scared and tense.",
|
23 |
"The emotion conveyed by this image is anger. The person looks furious and irritated.",
|
24 |
+
"The emotion conveyed by this image is happy. The person looks happy and cheerful.",
|
25 |
"The emotion conveyed by this image is sadness. The person looks unhappy and gloomy.",
|
26 |
"The emotion conveyed by this image is disgust. The person looks repulsed and sickened.",
|
27 |
"The emotion conveyed by this image is surprise. The person looks astonished and amazed.",
|