Spaces:
Sleeping
Sleeping
updated utils with only caption generation. Commented emotions
Browse files- utils/utils.py +3 -3
utils/utils.py
CHANGED
@@ -9,11 +9,11 @@ import spaces
|
|
9 |
def get_label(image):
|
10 |
caption = get_caption(image)
|
11 |
|
12 |
-
pred = get_emotions(image, caption)
|
13 |
|
14 |
emotions = ['Excitement', 'Sadness', 'Amusement', 'Disgust', 'Awe', 'Contentment', 'Fear', 'Anger']
|
15 |
-
probabilities = pred
|
16 |
-
|
17 |
max_idx = np.argmax(probabilities)
|
18 |
|
19 |
# Create color list where all bars are one color, and the max bar is another color
|
|
|
9 |
def get_label(image):
|
10 |
caption = get_caption(image)
|
11 |
|
12 |
+
#pred = get_emotions(image, caption)
|
13 |
|
14 |
emotions = ['Excitement', 'Sadness', 'Amusement', 'Disgust', 'Awe', 'Contentment', 'Fear', 'Anger']
|
15 |
+
#probabilities = pred
|
16 |
+
probabilities = [10, 6, 8, 1, 5, 10, 6, 8]
|
17 |
max_idx = np.argmax(probabilities)
|
18 |
|
19 |
# Create color list where all bars are one color, and the max bar is another color
|