Update app.py
Browse files
app.py
CHANGED
|
@@ -130,7 +130,7 @@ def infer(url_in,interpolation,fps_output):
|
|
| 130 |
|
| 131 |
|
| 132 |
def logscale(linear):
|
| 133 |
-
return math.pow(2, linear)
|
| 134 |
|
| 135 |
|
| 136 |
title="""
|
|
@@ -164,12 +164,12 @@ 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=math.pow(2, interpolation_slider.value), show_label=False)
|
| 168 |
-
interpolation_slider.
|
| 169 |
with gr.Row():
|
| 170 |
fps_output_slider = gr.Slider(minimum=1, maximum=5, step=1, value=5, label="FPS output: ")
|
| 171 |
-
fps_output = gr.Label(value=math.pow(2, fps_output_slider.value), show_label=False)
|
| 172 |
-
fps_output_slider.
|
| 173 |
submit_btn = gr.Button("Submit")
|
| 174 |
|
| 175 |
with gr.Column():
|
|
|
|
| 130 |
|
| 131 |
|
| 132 |
def logscale(linear):
|
| 133 |
+
return int(math.pow(2, linear))
|
| 134 |
|
| 135 |
|
| 136 |
title="""
|
|
|
|
| 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=int(math.pow(2, interpolation_slider.value)), 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=1, maximum=5, step=1, value=5, label="FPS output: ")
|
| 171 |
+
fps_output = gr.Label(value=int(math.pow(2, fps_output_slider.value)), show_label=False)
|
| 172 |
+
fps_output_slider.change(fn=logscale, inputs=[fps_output_slider], outputs=[fps_output])
|
| 173 |
submit_btn = gr.Button("Submit")
|
| 174 |
|
| 175 |
with gr.Column():
|