Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -42,8 +42,8 @@ def load_video(vid):
|
|
42 |
minutes = int(msc/1000)/60
|
43 |
hours = int(msc/1000)/360
|
44 |
vid_len = f'{hours}:{minutes}:{seconds}'
|
45 |
-
vid_len_up = gr.update(label = "End", value = f"{vid_len}", placeholder = "0:00:54")
|
46 |
-
return frame_count, fps,
|
47 |
|
48 |
def capture_function(vid=None):
|
49 |
new_video_in = str(vid)
|
@@ -169,8 +169,8 @@ with gr.Blocks() as app:
|
|
169 |
fps=gr.Textbox(label="FPS",interactive = False)
|
170 |
outp_file=gr.Files()
|
171 |
with gr.Row():
|
172 |
-
start_f = gr.Textbox(label = "Start", value = "0:00:00", placeholder = "0:00:23")
|
173 |
-
end_f = gr.Textbox(label = "End", value = "0:00:05", placeholder = "0:00:54")
|
174 |
trim_btn=gr.Button("Trim")
|
175 |
out_trim=gr.Video(format="mp4")
|
176 |
hid_box = gr.Textbox(visible=False)
|
|
|
42 |
minutes = int(msc/1000)/60
|
43 |
hours = int(msc/1000)/360
|
44 |
vid_len = f'{hours}:{minutes}:{seconds}'
|
45 |
+
#vid_len_up = gr.update(label = "End", value = f"{vid_len}", placeholder = "0:00:54")
|
46 |
+
return frame_count, fps, vid_len
|
47 |
|
48 |
def capture_function(vid=None):
|
49 |
new_video_in = str(vid)
|
|
|
169 |
fps=gr.Textbox(label="FPS",interactive = False)
|
170 |
outp_file=gr.Files()
|
171 |
with gr.Row():
|
172 |
+
start_f = gr.Textbox(label = "Start", value = "0:00:00", placeholder = "0:00:23",interactive = True)
|
173 |
+
end_f = gr.Textbox(label = "End", value = "0:00:05", placeholder = "0:00:54",interactive = True)
|
174 |
trim_btn=gr.Button("Trim")
|
175 |
out_trim=gr.Video(format="mp4")
|
176 |
hid_box = gr.Textbox(visible=False)
|