Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ def process_and_show_completion(video_input_path, anomaly_threshold_input, fps,
|
|
37 |
total_exec_time = end_time - start_time
|
38 |
|
39 |
output = [
|
40 |
-
total_exec_time, results_summary,
|
41 |
df, mse_embeddings, mse_posture, mse_voice,
|
42 |
mse_plot_embeddings, mse_plot_posture, mse_plot_voice,
|
43 |
mse_histogram_embeddings, mse_histogram_posture, mse_histogram_voice,
|
@@ -59,14 +59,14 @@ def process_and_show_completion(video_input_path, anomaly_threshold_input, fps,
|
|
59 |
return [error_message] + [None] * 27
|
60 |
|
61 |
def show_results():
|
62 |
-
return [gr.
|
63 |
|
64 |
def start_execution_timer():
|
65 |
-
return gr.
|
66 |
|
67 |
-
def update_execution_time():
|
68 |
current_time = time.time() - start_time
|
69 |
-
return
|
70 |
|
71 |
with gr.Blocks() as iface:
|
72 |
start_time = gr.State(0)
|
|
|
37 |
total_exec_time = end_time - start_time
|
38 |
|
39 |
output = [
|
40 |
+
f"Execution time: {total_exec_time:.2f} seconds", results_summary,
|
41 |
df, mse_embeddings, mse_posture, mse_voice,
|
42 |
mse_plot_embeddings, mse_plot_posture, mse_plot_voice,
|
43 |
mse_histogram_embeddings, mse_histogram_posture, mse_histogram_voice,
|
|
|
59 |
return [error_message] + [None] * 27
|
60 |
|
61 |
def show_results():
|
62 |
+
return [gr.update(visible=True) for _ in range(4)]
|
63 |
|
64 |
def start_execution_timer():
|
65 |
+
return gr.update(value="Execution time: 0 seconds", visible=True)
|
66 |
|
67 |
+
def update_execution_time(start_time):
|
68 |
current_time = time.time() - start_time
|
69 |
+
return f"Execution time: {current_time:.2f} seconds"
|
70 |
|
71 |
with gr.Blocks() as iface:
|
72 |
start_time = gr.State(0)
|