Jeysshon
commited on
Commit
•
2a1d5c1
1
Parent(s):
414883d
Update app.py
Browse files
app.py
CHANGED
@@ -9,18 +9,18 @@ learn_emotion_labels = learn_emotion.dls.vocab
|
|
9 |
learn_sentiment = load_learner('sentiment_jey.pkl')
|
10 |
learn_sentiment_labels = learn_sentiment.dls.vocab
|
11 |
|
12 |
-
# Diccionario
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
|
25 |
# Función de predicción
|
26 |
def predict(img_path):
|
|
|
9 |
learn_sentiment = load_learner('sentiment_jey.pkl')
|
10 |
learn_sentiment_labels = learn_sentiment.dls.vocab
|
11 |
|
12 |
+
# Diccionario
|
13 |
+
label_mapping = {
|
14 |
+
'angry': 'enojado',
|
15 |
+
'disgust': 'asco',
|
16 |
+
'fear': 'miedo',
|
17 |
+
'happy': 'feliz',
|
18 |
+
'sad': 'triste',
|
19 |
+
'surprise': 'sorpresa',
|
20 |
+
'neutral': 'neutral',
|
21 |
+
'negative': 'negativo',
|
22 |
+
'positive': 'positivo'
|
23 |
+
}
|
24 |
|
25 |
# Función de predicción
|
26 |
def predict(img_path):
|