Spaces:
Sleeping
Sleeping
Upload main.py
Browse files
main.py
CHANGED
@@ -68,13 +68,13 @@ async def predict(file: UploadFile = File(...)):
|
|
68 |
|
69 |
class_names = ['angry', 'happy', 'sad', 'surprised', 'neutral', 'disgusted', 'fearful']
|
70 |
stress_levels = {
|
71 |
-
'angry': '
|
72 |
-
'happy': '
|
73 |
-
'sad': '
|
74 |
-
'surprised': '
|
75 |
-
'neutral': '
|
76 |
-
'disgusted': '
|
77 |
-
'fearful': '
|
78 |
}
|
79 |
|
80 |
emotion = class_names[predicted_class]
|
|
|
68 |
|
69 |
class_names = ['angry', 'happy', 'sad', 'surprised', 'neutral', 'disgusted', 'fearful']
|
70 |
stress_levels = {
|
71 |
+
'angry': 'high_stress',
|
72 |
+
'happy': 'neutral',
|
73 |
+
'sad': 'low_stress',
|
74 |
+
'surprised': 'low_stress',
|
75 |
+
'neutral': 'neutral',
|
76 |
+
'disgusted': 'low_stress',
|
77 |
+
'fearful': 'low_stress'
|
78 |
}
|
79 |
|
80 |
emotion = class_names[predicted_class]
|