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 |
-
heatmap_video_path,
|
| 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,9 +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 |
-
heatmap_video_path,
|
| 45 |
-
correlation_heatmap,
|
| 46 |
-
combined_mse_plot
|
| 47 |
]
|
| 48 |
|
| 49 |
return output
|
|
@@ -124,7 +122,7 @@ with gr.Blocks() as iface:
|
|
| 124 |
face_samples_most_frequent,
|
| 125 |
aligned_faces_folder_store, frames_folder_store,
|
| 126 |
mse_heatmap_embeddings_store, mse_heatmap_posture_store, mse_heatmap_voice_store,
|
| 127 |
-
heatmap_video, correlation_heatmap_plot
|
| 128 |
]
|
| 129 |
).then(
|
| 130 |
show_results,
|
|
|
|
| 24 |
face_samples_frequent, \
|
| 25 |
anomaly_faces_embeddings, anomaly_frames_posture_images, \
|
| 26 |
aligned_faces_folder, frames_folder, \
|
| 27 |
+
heatmap_video_path, combined_mse_plot, 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 |
+
heatmap_video_path, combined_mse_plot, correlation_heatmap
|
|
|
|
|
|
|
| 45 |
]
|
| 46 |
|
| 47 |
return output
|
|
|
|
| 122 |
face_samples_most_frequent,
|
| 123 |
aligned_faces_folder_store, frames_folder_store,
|
| 124 |
mse_heatmap_embeddings_store, mse_heatmap_posture_store, mse_heatmap_voice_store,
|
| 125 |
+
heatmap_video, combined_mse_plot, correlation_heatmap_plot
|
| 126 |
]
|
| 127 |
).then(
|
| 128 |
show_results,
|