Commit
Β·
89eb93f
1
Parent(s):
c640de1
111
Browse files- __pycache__/my_uie.cpython-310.pyc +0 -0
- app.py +11 -1
- app/__pycache__/__init__.cpython-310.pyc +0 -0
- app/__pycache__/app_utils.cpython-310.pyc +0 -0
- app/__pycache__/authors.cpython-310.pyc +0 -0
- app/__pycache__/config.cpython-310.pyc +0 -0
- app/__pycache__/description.cpython-310.pyc +0 -0
- app/__pycache__/face_utils.cpython-310.pyc +0 -0
- app/__pycache__/model.cpython-310.pyc +0 -0
- app/__pycache__/model_architectures.cpython-310.pyc +0 -0
- app/__pycache__/plot.cpython-310.pyc +0 -0
- my_uie.py +6 -0
- result_face.mp4 +0 -0
- result_hm.mp4 +0 -0
__pycache__/my_uie.cpython-310.pyc
ADDED
|
Binary file (387 Bytes). View file
|
|
|
app.py
CHANGED
|
@@ -8,12 +8,15 @@ License: MIT License
|
|
| 8 |
"""
|
| 9 |
|
| 10 |
import gradio as gr
|
| 11 |
-
|
| 12 |
# Importing necessary components for the Gradio app
|
| 13 |
from app.description import DESCRIPTION_STATIC, DESCRIPTION_DYNAMIC
|
| 14 |
from app.authors import AUTHORS
|
| 15 |
from app.app_utils import preprocess_image_and_predict, preprocess_video_and_predict
|
| 16 |
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
def clear_static_info():
|
| 19 |
return (
|
|
@@ -57,6 +60,13 @@ with gr.Blocks(css="app.css") as demo:
|
|
| 57 |
],
|
| 58 |
[input_video],
|
| 59 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
|
| 62 |
|
|
|
|
| 8 |
"""
|
| 9 |
|
| 10 |
import gradio as gr
|
| 11 |
+
import my_uie
|
| 12 |
# Importing necessary components for the Gradio app
|
| 13 |
from app.description import DESCRIPTION_STATIC, DESCRIPTION_DYNAMIC
|
| 14 |
from app.authors import AUTHORS
|
| 15 |
from app.app_utils import preprocess_image_and_predict, preprocess_video_and_predict
|
| 16 |
|
| 17 |
+
def text_emo_analysize(text):
|
| 18 |
+
text_outcome = my_uie.text_emo_analysize(text)
|
| 19 |
+
return text_outcome
|
| 20 |
|
| 21 |
def clear_static_info():
|
| 22 |
return (
|
|
|
|
| 60 |
],
|
| 61 |
[input_video],
|
| 62 |
)
|
| 63 |
+
with gr.Row("ζζ¬ζ
ζεζ"):
|
| 64 |
+
with gr.Column():
|
| 65 |
+
gr.Markdown("ζζ¬ζ
ζεζ")
|
| 66 |
+
text_input = gr.Textbox(lines=2, placeholder='ε¨θΏιθΎε
₯ζζ¬')
|
| 67 |
+
text_submit_button = gr.Button("ζδΊ€ζζ¬ζ
ζεζ")
|
| 68 |
+
text_output = gr.Textbox(label="ζζ¬ζ
ζεζη»ζ")
|
| 69 |
+
text_submit_button.click(text_emo_analysize, inputs=text_input, outputs=text_output)
|
| 70 |
|
| 71 |
|
| 72 |
|
app/__pycache__/__init__.cpython-310.pyc
CHANGED
|
Binary files a/app/__pycache__/__init__.cpython-310.pyc and b/app/__pycache__/__init__.cpython-310.pyc differ
|
|
|
app/__pycache__/app_utils.cpython-310.pyc
CHANGED
|
Binary files a/app/__pycache__/app_utils.cpython-310.pyc and b/app/__pycache__/app_utils.cpython-310.pyc differ
|
|
|
app/__pycache__/authors.cpython-310.pyc
CHANGED
|
Binary files a/app/__pycache__/authors.cpython-310.pyc and b/app/__pycache__/authors.cpython-310.pyc differ
|
|
|
app/__pycache__/config.cpython-310.pyc
CHANGED
|
Binary files a/app/__pycache__/config.cpython-310.pyc and b/app/__pycache__/config.cpython-310.pyc differ
|
|
|
app/__pycache__/description.cpython-310.pyc
CHANGED
|
Binary files a/app/__pycache__/description.cpython-310.pyc and b/app/__pycache__/description.cpython-310.pyc differ
|
|
|
app/__pycache__/face_utils.cpython-310.pyc
CHANGED
|
Binary files a/app/__pycache__/face_utils.cpython-310.pyc and b/app/__pycache__/face_utils.cpython-310.pyc differ
|
|
|
app/__pycache__/model.cpython-310.pyc
CHANGED
|
Binary files a/app/__pycache__/model.cpython-310.pyc and b/app/__pycache__/model.cpython-310.pyc differ
|
|
|
app/__pycache__/model_architectures.cpython-310.pyc
CHANGED
|
Binary files a/app/__pycache__/model_architectures.cpython-310.pyc and b/app/__pycache__/model_architectures.cpython-310.pyc differ
|
|
|
app/__pycache__/plot.cpython-310.pyc
CHANGED
|
Binary files a/app/__pycache__/plot.cpython-310.pyc and b/app/__pycache__/plot.cpython-310.pyc differ
|
|
|
my_uie.py
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from paddlenlp import Taskflow
|
| 2 |
+
def text_emo_analysize(text):
|
| 3 |
+
senta = Taskflow("sentiment_analysis", model="skep_ernie_1.0_large_ch")
|
| 4 |
+
result=senta(text)
|
| 5 |
+
print(result)
|
| 6 |
+
return result
|
result_face.mp4
CHANGED
|
Binary files a/result_face.mp4 and b/result_face.mp4 differ
|
|
|
result_hm.mp4
CHANGED
|
Binary files a/result_hm.mp4 and b/result_hm.mp4 differ
|
|
|