Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -17,9 +17,6 @@ def get_mood_from_image(image: Image.Image):
|
|
17 |
moods = ["happy", "sad", "angry", "neutral"]
|
18 |
prompt = "The mood of the person in this image is: "
|
19 |
|
20 |
-
# Convert the numpy array to a PIL image
|
21 |
-
image = Image.fromarray((image * 255).astype(np.uint8))
|
22 |
-
|
23 |
# Create text prompts for each mood
|
24 |
text_inputs = [f"{prompt}{mood}" for mood in moods]
|
25 |
|
@@ -67,9 +64,7 @@ def generate_art(mood):
|
|
67 |
|
68 |
return image
|
69 |
|
70 |
-
def mood_art_generator(image
|
71 |
-
image = Image.fromarray((image * 255).astype(np.uint8))
|
72 |
-
|
73 |
mood = get_mood_from_image(image)
|
74 |
if mood:
|
75 |
art = generate_art(mood)
|
|
|
17 |
moods = ["happy", "sad", "angry", "neutral"]
|
18 |
prompt = "The mood of the person in this image is: "
|
19 |
|
|
|
|
|
|
|
20 |
# Create text prompts for each mood
|
21 |
text_inputs = [f"{prompt}{mood}" for mood in moods]
|
22 |
|
|
|
64 |
|
65 |
return image
|
66 |
|
67 |
+
def mood_art_generator(image):
|
|
|
|
|
68 |
mood = get_mood_from_image(image)
|
69 |
if mood:
|
70 |
art = generate_art(mood)
|