reab5555 commited on
Commit
127d580
·
verified ·
1 Parent(s): 8ee430e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -30,6 +30,9 @@ def analyze_video(video_path, max_speakers, progress=gr.Progress()):
30
  charts, explanations = create_charts(results)
31
  progress(1.0, desc="Charts generation complete.")
32
 
 
 
 
33
  output_components = []
34
 
35
  # Add transcript near the beginning
@@ -55,6 +58,10 @@ def analyze_video(video_path, max_speakers, progress=gr.Progress()):
55
  while len(output_components) < 49:
56
  output_components.extend([gr.update(visible=False)] * 8)
57
 
 
 
 
 
58
  return output_components
59
 
60
 
@@ -69,6 +76,10 @@ with gr.Blocks() as iface:
69
  # Create output components
70
  output_components = []
71
 
 
 
 
 
72
  for _ in range(3): # Assuming maximum of 3 speakers
73
  output_components.extend([
74
  gr.Markdown(visible=False),
 
30
  charts, explanations = create_charts(results)
31
  progress(1.0, desc="Charts generation complete.")
32
 
33
+ end_time = time.time()
34
+ execution_time = end_time - start_time
35
+
36
  output_components = []
37
 
38
  # Add transcript near the beginning
 
58
  while len(output_components) < 49:
59
  output_components.extend([gr.update(visible=False)] * 8)
60
 
61
+ # Add execution info
62
+ output_components.append(
63
+ gr.Textbox(value=f"Completed in {int(execution_time)} seconds.", label="Execution Information", visible=True))
64
+
65
  return output_components
66
 
67
 
 
76
  # Create output components
77
  output_components = []
78
 
79
+ # Add transcript output near the top
80
+ execution_info_box = gr.Textbox(label="Execution Information", value="N/A", lines=1)
81
+ output_components.append(execution_info_box)
82
+
83
  for _ in range(3): # Assuming maximum of 3 speakers
84
  output_components.extend([
85
  gr.Markdown(visible=False),