Update app.py
Browse files
app.py
CHANGED
|
@@ -91,7 +91,7 @@ def create_video(frames, fps, type):
|
|
| 91 |
|
| 92 |
def infer(url_in,interpolation,fps_output):
|
| 93 |
|
| 94 |
-
|
| 95 |
# 1. break video into frames and get FPS
|
| 96 |
break_vid = get_frames(url_in, "vid_input_frame", "origin")
|
| 97 |
frames_list= break_vid[0]
|
|
@@ -164,11 +164,11 @@ with gr.Blocks() as demo:
|
|
| 164 |
url_input = gr.Textbox(value="./examples/streetview.mp4", label="URL")
|
| 165 |
with gr.Row():
|
| 166 |
interpolation_slider = gr.Slider(minimum=1, maximum=5, step=1, value=1, label="Interpolation Steps: ")
|
| 167 |
-
interpolation = gr.Label(value=
|
| 168 |
interpolation_slider.change(fn=logscale, inputs=[interpolation_slider], outputs=[interpolation])
|
| 169 |
with gr.Row():
|
| 170 |
-
fps_output_slider = gr.Slider(minimum=
|
| 171 |
-
fps_output = gr.Label(value=
|
| 172 |
fps_output_slider.change(fn=logscale, inputs=[fps_output_slider], outputs=[fps_output])
|
| 173 |
submit_btn = gr.Button("Submit")
|
| 174 |
|
|
@@ -179,11 +179,11 @@ with gr.Blocks() as demo:
|
|
| 179 |
gr.Examples(
|
| 180 |
examples=[["./examples/streetview.mp4", 1, 1]],
|
| 181 |
fn=infer,
|
| 182 |
-
inputs=[url_input,interpolation_slider,
|
| 183 |
outputs=[video_output,file_output],
|
| 184 |
cache_examples=True
|
| 185 |
)
|
| 186 |
|
| 187 |
-
submit_btn.click(fn=infer, inputs=[url_input,interpolation_slider,
|
| 188 |
|
| 189 |
demo.launch()
|
|
|
|
| 91 |
|
| 92 |
def infer(url_in,interpolation,fps_output):
|
| 93 |
|
| 94 |
+
fps_output = logscale(fps_output)
|
| 95 |
# 1. break video into frames and get FPS
|
| 96 |
break_vid = get_frames(url_in, "vid_input_frame", "origin")
|
| 97 |
frames_list= break_vid[0]
|
|
|
|
| 164 |
url_input = gr.Textbox(value="./examples/streetview.mp4", label="URL")
|
| 165 |
with gr.Row():
|
| 166 |
interpolation_slider = gr.Slider(minimum=1, maximum=5, step=1, value=1, label="Interpolation Steps: ")
|
| 167 |
+
interpolation = gr.Label(value=2, show_label=False)
|
| 168 |
interpolation_slider.change(fn=logscale, inputs=[interpolation_slider], outputs=[interpolation])
|
| 169 |
with gr.Row():
|
| 170 |
+
fps_output_slider = gr.Slider(minimum=0, maximum=5, step=1, value=5, label="FPS output: ")
|
| 171 |
+
fps_output = gr.Label(value=1, show_label=False)
|
| 172 |
fps_output_slider.change(fn=logscale, inputs=[fps_output_slider], outputs=[fps_output])
|
| 173 |
submit_btn = gr.Button("Submit")
|
| 174 |
|
|
|
|
| 179 |
gr.Examples(
|
| 180 |
examples=[["./examples/streetview.mp4", 1, 1]],
|
| 181 |
fn=infer,
|
| 182 |
+
inputs=[url_input,interpolation_slider,fps_output_slider],
|
| 183 |
outputs=[video_output,file_output],
|
| 184 |
cache_examples=True
|
| 185 |
)
|
| 186 |
|
| 187 |
+
submit_btn.click(fn=infer, inputs=[url_input,interpolation_slider,fps_output_slider], outputs=[video_output, file_output])
|
| 188 |
|
| 189 |
demo.launch()
|