Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -163,7 +163,7 @@ def make_video(video_path, outdir='./vis_video_depth', encoder='vits'):
|
|
163 |
cv2.destroyAllWindows()
|
164 |
|
165 |
frame_n.value = 0
|
166 |
-
frame_n.maximum = len(orig_frames)
|
167 |
|
168 |
return final_vid, final_zip, orig_frames, depth_frames #output_path
|
169 |
|
@@ -316,16 +316,16 @@ with gr.Blocks(css=css) as demo:
|
|
316 |
input_url = gr.Textbox(value="./examples/streetview.mp4", label="URL")
|
317 |
input_video = gr.Video(label="Input Video", format="mp4")
|
318 |
input_url.change(fn=loadurl, inputs=[input_url], outputs=[input_video])
|
|
|
|
|
319 |
submit = gr.Button("Submit")
|
320 |
-
output_frame = gr.Gallery(label="Frame", type='numpy', columns=8192)
|
321 |
-
output_depth = gr.Gallery(label="Depth", type='numpy', columns=8192)
|
322 |
-
frame_n = gr.Slider(label="Frame #", minimum=0, maximum=0, step=1, value=0)
|
323 |
-
render = gr.Button("Render")
|
324 |
with gr.Column():
|
325 |
model_type = gr.Dropdown([("small", "vits"), ("base", "vitb"), ("large", "vitl")], type="value", value="vits", label='Model Type')
|
326 |
processed_video = gr.Video(label="Output Video", format="mp4")
|
327 |
processed_zip = gr.File(label="Output Archive")
|
328 |
result = gr.Model3D(label="3D Mesh", clear_color=[0.5, 0.5, 0.5, 0.0], camera_position=[0, 90, 0])
|
|
|
|
|
329 |
|
330 |
def on_submit(uploaded_video,model_type):
|
331 |
|
|
|
163 |
cv2.destroyAllWindows()
|
164 |
|
165 |
frame_n.value = 0
|
166 |
+
frame_n.maximum = len(orig_frames)-1
|
167 |
|
168 |
return final_vid, final_zip, orig_frames, depth_frames #output_path
|
169 |
|
|
|
316 |
input_url = gr.Textbox(value="./examples/streetview.mp4", label="URL")
|
317 |
input_video = gr.Video(label="Input Video", format="mp4")
|
318 |
input_url.change(fn=loadurl, inputs=[input_url], outputs=[input_video])
|
319 |
+
output_frame = gr.Gallery(label="Frame", type='numpy', preview=True, columns=8192)
|
320 |
+
output_depth = gr.Gallery(label="Depth", type='numpy', preview=True, columns=8192)
|
321 |
submit = gr.Button("Submit")
|
|
|
|
|
|
|
|
|
322 |
with gr.Column():
|
323 |
model_type = gr.Dropdown([("small", "vits"), ("base", "vitb"), ("large", "vitl")], type="value", value="vits", label='Model Type')
|
324 |
processed_video = gr.Video(label="Output Video", format="mp4")
|
325 |
processed_zip = gr.File(label="Output Archive")
|
326 |
result = gr.Model3D(label="3D Mesh", clear_color=[0.5, 0.5, 0.5, 0.0], camera_position=[0, 90, 0])
|
327 |
+
frame_n = gr.Slider(label="Frame #", minimum=0, maximum=0, step=1, value=0)
|
328 |
+
render = gr.Button("Render")
|
329 |
|
330 |
def on_submit(uploaded_video,model_type):
|
331 |
|