SaladSlayer00 commited on
Commit
84e5b54
·
1 Parent(s): 79be334

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -79,11 +79,7 @@ def process_video(uploaded_video, name, surname, interval_ms):
79
 
80
 
81
  example_video_path = "examples/vid.mp4"
82
- if os.path.exists(example_video_path):
83
- with open(example_video_path, "rb") as file:
84
- example_video_bytes = file.read()
85
- else:
86
- example_video_bytes = None
87
  # Gradio Interface
88
  with gr.Blocks() as demo:
89
  gr.Markdown("### Video Uploader and Face Detector")
@@ -91,7 +87,7 @@ with gr.Blocks() as demo:
91
  gr.Markdown("Make a short 5-7 seconds video as shown in the example, with good lighting and visible face for best results.")
92
  with gr.Row():
93
  with gr.Column():
94
- video = gr.File(label="Upload Your Video, Like This!", type="binary", value=example_video_bytes)
95
 
96
  with gr.Column():
97
  name = gr.Textbox(label="Name")
 
79
 
80
 
81
  example_video_path = "examples/vid.mp4"
82
+
 
 
 
 
83
  # Gradio Interface
84
  with gr.Blocks() as demo:
85
  gr.Markdown("### Video Uploader and Face Detector")
 
87
  gr.Markdown("Make a short 5-7 seconds video as shown in the example, with good lighting and visible face for best results.")
88
  with gr.Row():
89
  with gr.Column():
90
+ video = gr.File(label="Upload Your Video, Like This!", type="filepath", value=example_video_path)
91
 
92
  with gr.Column():
93
  name = gr.Textbox(label="Name")