Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -301,13 +301,13 @@ def blur_image(image, depth, blur_data):
|
|
301 |
def loadurl(url):
|
302 |
return url
|
303 |
|
304 |
-
def select_frame(v, evt: gr.SelectData):
|
305 |
global frame_selected
|
306 |
if evt.index != frame_selected:
|
307 |
frame_selected = evt.index
|
308 |
print(v)
|
309 |
-
print(
|
310 |
-
return gr.Gallery(selected_index=evt.index, preview=True), frame_selected
|
311 |
|
312 |
|
313 |
css = """
|
@@ -568,8 +568,8 @@ with gr.Blocks(css=css) as demo:
|
|
568 |
<a id='move' href='#'>move</a> <a id='rotate' href='#'>rotate</a> <a id='scale' href='#'>scale</a>
|
569 |
</pre>""")
|
570 |
selected = gr.Number(elem_id="fnum", value=0, minimum=0, maximum=256, interactive=False)
|
571 |
-
output_frame.select(fn=select_frame, inputs=[output_mask], outputs=[output_depth, selected], show_progress='hidden')
|
572 |
-
output_depth.select(fn=select_frame, inputs=[output_mask], outputs=[output_frame, selected], show_progress='hidden')
|
573 |
example_coords = """[
|
574 |
{"latLng": { "lat": 50.07379596793083, "lng": 14.437146122950555 } },
|
575 |
{"latLng": { "lat": 50.073799567020004, "lng": 14.437146774240507 } },
|
|
|
301 |
def loadurl(url):
|
302 |
return url
|
303 |
|
304 |
+
def select_frame(v, f, evt: gr.SelectData):
|
305 |
global frame_selected
|
306 |
if evt.index != frame_selected:
|
307 |
frame_selected = evt.index
|
308 |
print(v)
|
309 |
+
print(f)
|
310 |
+
return gr.Gallery(selected_index=evt.index, preview=True), f, frame_selected
|
311 |
|
312 |
|
313 |
css = """
|
|
|
568 |
<a id='move' href='#'>move</a> <a id='rotate' href='#'>rotate</a> <a id='scale' href='#'>scale</a>
|
569 |
</pre>""")
|
570 |
selected = gr.Number(elem_id="fnum", value=0, minimum=0, maximum=256, interactive=False)
|
571 |
+
output_frame.select(fn=select_frame, inputs=[output_mask, output_frame], outputs=[output_depth, output_mask, selected], show_progress='hidden')
|
572 |
+
output_depth.select(fn=select_frame, inputs=[output_mask, output_frame], outputs=[output_frame, output_mask, selected], show_progress='hidden')
|
573 |
example_coords = """[
|
574 |
{"latLng": { "lat": 50.07379596793083, "lng": 14.437146122950555 } },
|
575 |
{"latLng": { "lat": 50.073799567020004, "lng": 14.437146774240507 } },
|