Kyan14 commited on
Commit
c44d97e
·
1 Parent(s): 32195dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -6
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: np.ndarray):
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)