dschandra commited on
Commit
cb6edeb
·
verified ·
1 Parent(s): b8d8601

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -166,13 +166,13 @@ def build_interface() -> gr.Blocks:
166
  def on_video_upload(video_file):
167
  if video_file is None:
168
  return None
169
- save_path = save_uploaded_video(video_file, video_file)
170
- return save_path
 
171
 
172
- video_input.change(
173
- fn=on_video_upload,
174
- inputs=[video_input],
175
- outputs=[out_video_path],
176
  )
177
 
178
  gr.Markdown(
 
166
  def on_video_upload(video_file):
167
  if video_file is None:
168
  return None
169
+ file_path = video_file.name if hasattr(video_file, "name")else video_file
170
+ #save_path = save_uploaded_video(video_file, video_file)
171
+ return save_uploaded_video(file_path, video_file)
172
 
173
+ video_input = gr.Video(
174
+ label = "Record or Upload match video",
175
+ sources =["upload", "webcam"]
 
176
  )
177
 
178
  gr.Markdown(