Spaces:
Running
Running
abrar-adnan
commited on
Commit
•
7dfcf08
1
Parent(s):
3d2fb9b
added all emotions
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ backends = [
|
|
23 |
'mediapipe'
|
24 |
]
|
25 |
|
26 |
-
emotion_pipeline = pipeline("text-classification", model="
|
27 |
sentiment_pipeline = pipeline("sentiment-analysis", model="distilbert-base-uncased-finetuned-sst-2-english")
|
28 |
|
29 |
model = load_learner("gaze-recognizer-v3.pkl")
|
@@ -195,7 +195,7 @@ def video_processing(video_file, encoded_video):
|
|
195 |
print(f'total sad percentage = {sad}')
|
196 |
print(f'total surprise percentage = {surprise}')
|
197 |
print(f'total neutral percentage = {neutral}')
|
198 |
-
final_result = "Gaze = "+str(gaze_percentage)+"\nFace Emotion = "+str(
|
199 |
return final_result
|
200 |
|
201 |
|
|
|
23 |
'mediapipe'
|
24 |
]
|
25 |
|
26 |
+
emotion_pipeline = pipeline("text-classification", model="j-hartmann/emotion-english-distilroberta-base", return_all_scores=True)
|
27 |
sentiment_pipeline = pipeline("sentiment-analysis", model="distilbert-base-uncased-finetuned-sst-2-english")
|
28 |
|
29 |
model = load_learner("gaze-recognizer-v3.pkl")
|
|
|
195 |
print(f'total sad percentage = {sad}')
|
196 |
print(f'total surprise percentage = {surprise}')
|
197 |
print(f'total neutral percentage = {neutral}')
|
198 |
+
final_result = "Gaze = "+str(gaze_percentage)+"\nFace Emotion = "+str(emotion)+"\nText Emotion = "+str(text_emotion)+"\nText transcription = "+str(transcription)+"\nText sentiment = "+str(text_sentiment)
|
199 |
return final_result
|
200 |
|
201 |
|