drsaikirant88
commited on
Commit
•
78c42e7
1
Parent(s):
7cb3d00
Update app.py
Browse files
app.py
CHANGED
@@ -255,7 +255,7 @@ def predict(img):
|
|
255 |
emotions = {learn_emotion_labels[i]: float(probs_emotion[i]) for i in range(len(learn_emotion_labels))}
|
256 |
sentiments = {learn_sentiment_labels[i]: float(probs_sentiment[i]) for i in range(len(learn_sentiment_labels))}
|
257 |
|
258 |
-
output = [img
|
259 |
|
260 |
else: # Max 3 for now
|
261 |
for face in faces[:3]:
|
@@ -269,7 +269,7 @@ def predict(img):
|
|
269 |
emotions = {learn_emotion_labels[i]: float(probs_emotion[i]) for i in range(len(learn_emotion_labels))}
|
270 |
sentiments = {learn_sentiment_labels[i]: float(probs_sentiment[i]) for i in range(len(learn_sentiment_labels))}
|
271 |
|
272 |
-
output.append(img
|
273 |
output.append(emotions)
|
274 |
output.append(sentiments)
|
275 |
|
|
|
255 |
emotions = {learn_emotion_labels[i]: float(probs_emotion[i]) for i in range(len(learn_emotion_labels))}
|
256 |
sentiments = {learn_sentiment_labels[i]: float(probs_sentiment[i]) for i in range(len(learn_sentiment_labels))}
|
257 |
|
258 |
+
output = [img, emotions, sentiments, None, None, None, None, None, None]
|
259 |
|
260 |
else: # Max 3 for now
|
261 |
for face in faces[:3]:
|
|
|
269 |
emotions = {learn_emotion_labels[i]: float(probs_emotion[i]) for i in range(len(learn_emotion_labels))}
|
270 |
sentiments = {learn_sentiment_labels[i]: float(probs_sentiment[i]) for i in range(len(learn_sentiment_labels))}
|
271 |
|
272 |
+
output.append(img)
|
273 |
output.append(emotions)
|
274 |
output.append(sentiments)
|
275 |
|