thienphuc12339 commited on
Commit
4fc155e
Β·
verified Β·
1 Parent(s): 1fb0975

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -69,7 +69,8 @@ def create_interface():
69
  with gr.Column():
70
  video_input = gr.Video(
71
  label="πŸ“‚ Upload Your Video",
72
- sources="upload", # Ensure file path is returned
 
73
  format="mp4" # Use mp4 format for compatibility
74
  )
75
  predict_button = gr.Button("πŸ” Run Prediction")
@@ -84,10 +85,10 @@ def create_interface():
84
  with gr.Column():
85
  video_recorder = gr.Video(
86
  label="πŸŽ₯ Record Your Video",
87
- sources="webcam", # Ensure file path is returned
88
- format="mp4", # Use mp4 format for compatibility
89
- recording_width=640, # Reduce resolution to 640x480
90
- recording_height=480
91
  )
92
  predict_button_rec = gr.Button("πŸ” Run Prediction on Recorded Video")
93
  prediction_output_rec = gr.Textbox(
 
69
  with gr.Column():
70
  video_input = gr.Video(
71
  label="πŸ“‚ Upload Your Video",
72
+ source="upload", # Correct parameter name
73
+ type="filepath", # Ensure file path is returned
74
  format="mp4" # Use mp4 format for compatibility
75
  )
76
  predict_button = gr.Button("πŸ” Run Prediction")
 
85
  with gr.Column():
86
  video_recorder = gr.Video(
87
  label="πŸŽ₯ Record Your Video",
88
+ source="webcam", # Correct parameter name
89
+ type="filepath", # Ensure file path is returned
90
+ format="mp4" # Use mp4 format for compatibility
91
+ # Removed 'recording_width' and 'recording_height'
92
  )
93
  predict_button_rec = gr.Button("πŸ” Run Prediction on Recorded Video")
94
  prediction_output_rec = gr.Textbox(