Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,11 +4,9 @@ from transformers import pipeline
|
|
4 |
import tempfile
|
5 |
import cv2
|
6 |
import moviepy.editor as mp
|
7 |
-
|
8 |
def analyze_text(text):
|
9 |
classifier = pipeline("sentiment-analysis")
|
10 |
return classifier(text)[0]['label']
|
11 |
-
|
12 |
def analyze_video_emotion(video_file):
|
13 |
try:
|
14 |
# Save the uploaded video to a temp file
|
@@ -54,14 +52,4 @@ iface = gr.Interface(
|
|
54 |
title="Emotion & Sentiment Decoder",
|
55 |
description="Analyzes social media text & facial expressions from video."
|
56 |
)
|
57 |
-
|
58 |
-
iface.launch()
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
|
|
4 |
import tempfile
|
5 |
import cv2
|
6 |
import moviepy.editor as mp
|
|
|
7 |
def analyze_text(text):
|
8 |
classifier = pipeline("sentiment-analysis")
|
9 |
return classifier(text)[0]['label']
|
|
|
10 |
def analyze_video_emotion(video_file):
|
11 |
try:
|
12 |
# Save the uploaded video to a temp file
|
|
|
52 |
title="Emotion & Sentiment Decoder",
|
53 |
description="Analyzes social media text & facial expressions from video."
|
54 |
)
|
55 |
+
iface.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|