dschandra commited on
Commit
c920080
·
verified ·
1 Parent(s): a0991f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -3,13 +3,17 @@ from video_processor import process_video
3
  import os
4
 
5
  def analyze_lbw(video):
 
6
  output_path = process_video(video)
7
- return output_path
 
 
 
8
 
9
  app = gr.Interface(
10
  fn=analyze_lbw,
11
  inputs=gr.Video(label="Upload Cricket Clip"),
12
- outputs=gr.Video(label="LBW Analysis Output"),
13
  title="Smart LBW Decision System",
14
  description="Upload a short video to analyze LBW using AI-powered object detection and tracking"
15
  )
 
3
  import os
4
 
5
  def analyze_lbw(video):
6
+ """Analyze a video for LBW detection, return processed video path and decision."""
7
  output_path = process_video(video)
8
+ # Extract decision from the last processed frame (assuming it's the final decision)
9
+ # This requires the video_processor to return or modify to track the decision
10
+ decision = "Pending" # Placeholder; will be updated in video_processor
11
+ return output_path, decision
12
 
13
  app = gr.Interface(
14
  fn=analyze_lbw,
15
  inputs=gr.Video(label="Upload Cricket Clip"),
16
+ outputs=[gr.Video(label="LBW Analysis Output"), gr.Textbox(label="Decision")],
17
  title="Smart LBW Decision System",
18
  description="Upload a short video to analyze LBW using AI-powered object detection and tracking"
19
  )