Update app.py
Browse files
app.py
CHANGED
@@ -458,7 +458,7 @@ load_model="""
|
|
458 |
async()=>{
|
459 |
var intv = setInterval(function(){
|
460 |
if (document.getElementById("output_video").getElementsByTagName("video")) {
|
461 |
-
|
462 |
clearInterval(intv);
|
463 |
}
|
464 |
}, 40);
|
@@ -589,6 +589,19 @@ if (document.getElementById("image_edit") && document.getElementById("image_edit
|
|
589 |
}
|
590 |
}, 40);
|
591 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
592 |
}
|
593 |
"""
|
594 |
|
@@ -735,7 +748,10 @@ with gr.Blocks(css=css, js=js, head=head) as demo:
|
|
735 |
{"lat": 50.073823157821664, "lng": 14.437124189538856, "heading": 152.95769, "pitch": 4.233024999999998}
|
736 |
]"""
|
737 |
coords = gr.Textbox(elem_id="coords", value=example_coords, label="Coordinates", interactive=False)
|
738 |
-
|
|
|
|
|
|
|
739 |
input_json.input(show_json, inputs=[input_json], outputs=[processed_video, processed_zip, output_frame, output_mask, output_depth, coords])
|
740 |
|
741 |
|
|
|
458 |
async()=>{
|
459 |
var intv = setInterval(function(){
|
460 |
if (document.getElementById("output_video").getElementsByTagName("video")) {
|
461 |
+
document.getElementById("model3d").src = document.getElementById("model3d").src.split("#")[0] + "#" + document.getElementById("output_video").getElementsByTagName("video")[0].src;
|
462 |
clearInterval(intv);
|
463 |
}
|
464 |
}, 40);
|
|
|
589 |
}
|
590 |
}, 40);
|
591 |
|
592 |
+
function fullscreen() {
|
593 |
+
if (document.getElementById("model3d").style.position != 'fixed') {
|
594 |
+
document.getElementById("model3d").style.position = 'fixed';
|
595 |
+
document.getElementById("model3d").style.width = window.innerWidth + 'px';
|
596 |
+
document.getElementById("model3d").style.height = window.innerHeight + 'px';
|
597 |
+
} else {
|
598 |
+
document.getElementById("model3d").style.position = 'relative';
|
599 |
+
document.getElementById("model3d").style.width = '100%';
|
600 |
+
document.getElementById("model3d").style.height = '320px';
|
601 |
+
}
|
602 |
+
}
|
603 |
+
window.fullscreen = fullscreen;
|
604 |
+
|
605 |
}
|
606 |
"""
|
607 |
|
|
|
748 |
{"lat": 50.073823157821664, "lng": 14.437124189538856, "heading": 152.95769, "pitch": 4.233024999999998}
|
749 |
]"""
|
750 |
coords = gr.Textbox(elem_id="coords", value=example_coords, label="Coordinates", interactive=False)
|
751 |
+
render = gr.Button("Render")
|
752 |
+
model3d = gr.HTML(value="""
|
753 |
+
<iframe id='model3d' src='https://freeali.se/freealise/transparent_video/' onclick='fullscreen();' style='position:relative;width:100%;height:320px;'></iframe>
|
754 |
+
""")
|
755 |
input_json.input(show_json, inputs=[input_json], outputs=[processed_video, processed_zip, output_frame, output_mask, output_depth, coords])
|
756 |
|
757 |
|