Spaces:
Build error
Build error
Commit
·
be18558
1
Parent(s):
1bfd79c
12 Oct Gitex 2024
Browse files
tabs/FACS_analysis.py
CHANGED
|
@@ -86,16 +86,16 @@ def create_facs_analysis_tab():
|
|
| 86 |
with gr.Row():
|
| 87 |
with gr.Column(scale=1):
|
| 88 |
input_video = gr.Video()
|
| 89 |
-
analyze_btn = gr.Button("Analyze")
|
| 90 |
gr.Examples(["./assets/videos/fitness.mp4"], inputs=[input_video])
|
| 91 |
with gr.Column(scale=2):
|
| 92 |
output_image = gr.Image(label="Processed Frame")
|
| 93 |
facs_chart = gr.Plot(label="FACS Analysis for SAD")
|
| 94 |
|
| 95 |
-
|
|
|
|
| 96 |
fn=process_video_for_facs,
|
| 97 |
-
inputs=input_video,
|
| 98 |
-
outputs=[output_image, facs_chart]
|
| 99 |
)
|
| 100 |
|
| 101 |
-
return input_video, output_image, facs_chart
|
|
|
|
| 86 |
with gr.Row():
|
| 87 |
with gr.Column(scale=1):
|
| 88 |
input_video = gr.Video()
|
|
|
|
| 89 |
gr.Examples(["./assets/videos/fitness.mp4"], inputs=[input_video])
|
| 90 |
with gr.Column(scale=2):
|
| 91 |
output_image = gr.Image(label="Processed Frame")
|
| 92 |
facs_chart = gr.Plot(label="FACS Analysis for SAD")
|
| 93 |
|
| 94 |
+
# Automatically trigger the analysis when a video is uploaded
|
| 95 |
+
input_video.change(
|
| 96 |
fn=process_video_for_facs,
|
| 97 |
+
inputs=[input_video],
|
| 98 |
+
outputs=[output_image, facs_chart]
|
| 99 |
)
|
| 100 |
|
| 101 |
+
return input_video, output_image, facs_chart
|
tabs/__pycache__/FACS_analysis.cpython-310.pyc
CHANGED
|
Binary files a/tabs/__pycache__/FACS_analysis.cpython-310.pyc and b/tabs/__pycache__/FACS_analysis.cpython-310.pyc differ
|
|
|
tabs/__pycache__/speech_stress_analysis.cpython-310.pyc
CHANGED
|
Binary files a/tabs/__pycache__/speech_stress_analysis.cpython-310.pyc and b/tabs/__pycache__/speech_stress_analysis.cpython-310.pyc differ
|
|
|