Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,7 +24,7 @@ def process_and_show_completion(video_input_path, anomaly_threshold_input, fps,
|
|
| 24 |
face_samples_frequent, \
|
| 25 |
anomaly_faces_embeddings, anomaly_frames_posture_images, \
|
| 26 |
aligned_faces_folder, frames_folder, \
|
| 27 |
-
|
| 28 |
|
| 29 |
anomaly_faces_embeddings_pil = [Image.fromarray(face) for face in anomaly_faces_embeddings] if anomaly_faces_embeddings is not None else []
|
| 30 |
anomaly_frames_posture_pil = [Image.fromarray(frame) for frame in anomaly_frames_posture_images] if anomaly_frames_posture_images is not None else []
|
|
@@ -41,7 +41,7 @@ def process_and_show_completion(video_input_path, anomaly_threshold_input, fps,
|
|
| 41 |
face_samples_frequent,
|
| 42 |
aligned_faces_folder, frames_folder,
|
| 43 |
mse_embeddings, mse_posture, mse_voice,
|
| 44 |
-
|
| 45 |
]
|
| 46 |
|
| 47 |
return output
|
|
@@ -98,7 +98,7 @@ with gr.Blocks() as iface:
|
|
| 98 |
mse_voice_heatmap = gr.Plot(label="MSE Heatmap: Voice")
|
| 99 |
|
| 100 |
with gr.TabItem("Combined"):
|
| 101 |
-
|
| 102 |
correlation_heatmap_plot = gr.Plot(label="Correlation Heatmap")
|
| 103 |
|
| 104 |
with gr.Row():
|
|
@@ -220,7 +220,7 @@ with gr.Blocks() as iface:
|
|
| 220 |
face_samples_most_frequent,
|
| 221 |
aligned_faces_folder_store, frames_folder_store,
|
| 222 |
mse_heatmap_embeddings_store, mse_heatmap_posture_store, mse_heatmap_voice_store,
|
| 223 |
-
|
| 224 |
]
|
| 225 |
).then(
|
| 226 |
show_results,
|
|
|
|
| 24 |
face_samples_frequent, \
|
| 25 |
anomaly_faces_embeddings, anomaly_frames_posture_images, \
|
| 26 |
aligned_faces_folder, frames_folder, \
|
| 27 |
+
stacked_heatmap, correlation_heatmap = results
|
| 28 |
|
| 29 |
anomaly_faces_embeddings_pil = [Image.fromarray(face) for face in anomaly_faces_embeddings] if anomaly_faces_embeddings is not None else []
|
| 30 |
anomaly_frames_posture_pil = [Image.fromarray(frame) for frame in anomaly_frames_posture_images] if anomaly_frames_posture_images is not None else []
|
|
|
|
| 41 |
face_samples_frequent,
|
| 42 |
aligned_faces_folder, frames_folder,
|
| 43 |
mse_embeddings, mse_posture, mse_voice,
|
| 44 |
+
stacked_heatmap, correlation_heatmap
|
| 45 |
]
|
| 46 |
|
| 47 |
return output
|
|
|
|
| 98 |
mse_voice_heatmap = gr.Plot(label="MSE Heatmap: Voice")
|
| 99 |
|
| 100 |
with gr.TabItem("Combined"):
|
| 101 |
+
stacked_heatmap_plot = gr.Plot(label="Combined MSE Heatmaps")
|
| 102 |
correlation_heatmap_plot = gr.Plot(label="Correlation Heatmap")
|
| 103 |
|
| 104 |
with gr.Row():
|
|
|
|
| 220 |
face_samples_most_frequent,
|
| 221 |
aligned_faces_folder_store, frames_folder_store,
|
| 222 |
mse_heatmap_embeddings_store, mse_heatmap_posture_store, mse_heatmap_voice_store,
|
| 223 |
+
stacked_heatmap_plot, correlation_heatmap_plot
|
| 224 |
]
|
| 225 |
).then(
|
| 226 |
show_results,
|