Update app.py
Browse files
app.py
CHANGED
@@ -129,6 +129,10 @@ def infer(url_in,interpolation,fps_output):
|
|
129 |
return final_vid, files
|
130 |
|
131 |
|
|
|
|
|
|
|
|
|
132 |
title="""
|
133 |
<div style="text-align: center; max-width: 500px; margin: 0 auto;">
|
134 |
<div
|
@@ -159,12 +163,12 @@ with gr.Blocks() as demo:
|
|
159 |
with gr.Column():
|
160 |
url_input = gr.Textbox(value="./examples/streetview.mp4", label="URL")
|
161 |
with gr.Row():
|
162 |
-
|
163 |
-
|
164 |
-
interpolation.input(inputs=[
|
165 |
-
|
166 |
-
|
167 |
-
fps_output.input(inputs=[
|
168 |
submit_btn = gr.Button("Submit")
|
169 |
|
170 |
with gr.Column():
|
|
|
129 |
return final_vid, files
|
130 |
|
131 |
|
132 |
+
def logscale(linear):
|
133 |
+
return math.pow(2, linear)
|
134 |
+
|
135 |
+
|
136 |
title="""
|
137 |
<div style="text-align: center; max-width: 500px; margin: 0 auto;">
|
138 |
<div
|
|
|
163 |
with gr.Column():
|
164 |
url_input = gr.Textbox(value="./examples/streetview.mp4", label="URL")
|
165 |
with gr.Row():
|
166 |
+
interpolation_slider = gr.Slider(minimum=0, maximum=5, step=1, value=0, label="Interpolation Steps: ")
|
167 |
+
interpolation = gr.Label(value=math.pow(2, interpolation_slider.value))
|
168 |
+
interpolation.input(fn=logscale, inputs=[interpolation_slider], outputs=[interpolation])
|
169 |
+
fps_output_slider = gr.Slider(minimum=0, maximum=5, step=1, value=5, label="FPS output: ")
|
170 |
+
fps_output = gr.Label(value=math.pow(2, fps_output_slider.value))
|
171 |
+
fps_output.input(fn=logscale, inputs=[fps_output_slider], outputs=[fps_output])
|
172 |
submit_btn = gr.Button("Submit")
|
173 |
|
174 |
with gr.Column():
|