Update app.py
Browse files
app.py
CHANGED
@@ -15,13 +15,13 @@ def process_and_show_completion(video_input_path, anomaly_threshold_input, fps,
|
|
15 |
|
16 |
if isinstance(results[0], str) and results[0].startswith("Error"):
|
17 |
print(f"Error occurred: {results[0]}")
|
18 |
-
return [results[0]] + [None] *
|
19 |
|
20 |
exec_time, results_summary, df, mse_embeddings, mse_posture, \
|
21 |
mse_plot_embeddings, mse_histogram_embeddings, \
|
22 |
mse_plot_posture, mse_histogram_posture, \
|
23 |
mse_heatmap_embeddings, mse_heatmap_posture, \
|
24 |
-
face_samples_frequent,
|
25 |
anomaly_faces_embeddings, anomaly_frames_posture_images, \
|
26 |
aligned_faces_folder, frames_folder = results
|
27 |
|
@@ -29,7 +29,6 @@ def process_and_show_completion(video_input_path, anomaly_threshold_input, fps,
|
|
29 |
anomaly_frames_posture_pil = [Image.fromarray(frame) for frame in anomaly_frames_posture_images]
|
30 |
|
31 |
face_samples_frequent = [Image.open(path) for path in face_samples_frequent]
|
32 |
-
#face_samples_other = [Image.open(path) for path in face_samples_other]
|
33 |
|
34 |
output = [
|
35 |
exec_time, results_summary,
|
@@ -50,7 +49,7 @@ def process_and_show_completion(video_input_path, anomaly_threshold_input, fps,
|
|
50 |
print(error_message)
|
51 |
import traceback
|
52 |
traceback.print_exc()
|
53 |
-
return [error_message] + [None] *
|
54 |
|
55 |
with gr.Blocks() as iface:
|
56 |
gr.Markdown("""
|
|
|
15 |
|
16 |
if isinstance(results[0], str) and results[0].startswith("Error"):
|
17 |
print(f"Error occurred: {results[0]}")
|
18 |
+
return [results[0]] + [None] * 17
|
19 |
|
20 |
exec_time, results_summary, df, mse_embeddings, mse_posture, \
|
21 |
mse_plot_embeddings, mse_histogram_embeddings, \
|
22 |
mse_plot_posture, mse_histogram_posture, \
|
23 |
mse_heatmap_embeddings, mse_heatmap_posture, \
|
24 |
+
face_samples_frequent, \
|
25 |
anomaly_faces_embeddings, anomaly_frames_posture_images, \
|
26 |
aligned_faces_folder, frames_folder = results
|
27 |
|
|
|
29 |
anomaly_frames_posture_pil = [Image.fromarray(frame) for frame in anomaly_frames_posture_images]
|
30 |
|
31 |
face_samples_frequent = [Image.open(path) for path in face_samples_frequent]
|
|
|
32 |
|
33 |
output = [
|
34 |
exec_time, results_summary,
|
|
|
49 |
print(error_message)
|
50 |
import traceback
|
51 |
traceback.print_exc()
|
52 |
+
return [error_message] + [None] * 17
|
53 |
|
54 |
with gr.Blocks() as iface:
|
55 |
gr.Markdown("""
|