Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -1,24 +1,17 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
with gr.Tab("Analyze Video File"):
|
19 |
-
video_in = gr.Video(label="Upload Social Media Video")
|
20 |
-
video_out = gr.Textbox(label="Result")
|
21 |
-
video_button = gr.Button("Analyze Video")
|
22 |
-
video_button.click(fn=analyze_video, inputs=video_in, outputs=video_out)
|
23 |
|
24 |
-
app.launch(share=True)
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
from transforme import pipeline
|
4 |
+
|
5 |
+
sentiment = pipeline("emoition-analysis")
|
6 |
+
|
7 |
+
def get_emotion( input_text):
|
8 |
+
return emotion(input_text)
|
9 |
+
|
10 |
+
iface = gr.Inface(in = get_emotion,
|
11 |
+
input = "text",
|
12 |
+
outputs = ["text"],
|
13 |
+
title = 'emotion analysis',
|
14 |
+
description='get emotion negative/positive for the given input')
|
15 |
+
|
16 |
+
iface.lanch(inline = false)
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
|