Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -331,8 +331,9 @@ with gr.Blocks(css=css) as demo:
|
|
331 |
processed_video = gr.Video(label="Output Video", format="mp4")
|
332 |
processed_zip = gr.File(label="Output Archive")
|
333 |
result = gr.Model3D(label="3D Mesh", clear_color=[0.5, 0.5, 0.5, 0.0], camera_position=[0, 90, 0])
|
334 |
-
html = gr.HTML(value="<label for='zoom'>Zoom</label
|
335 |
-
|
|
|
336 |
canvas = gr.HTML(value="<a href='#' onclick=\"this.innerText=document.getElementsByClassName('model3D')[0].getElementsByTagName('canvas')[0].getContext('webgl2');\">webgl2</a>")
|
337 |
render = gr.Button("Render")
|
338 |
|
@@ -344,7 +345,7 @@ with gr.Blocks(css=css) as demo:
|
|
344 |
return output_video_path
|
345 |
|
346 |
submit.click(on_submit, inputs=[input_video, model_type], outputs=[processed_video, processed_zip, output_frame, output_depth])
|
347 |
-
render.click(partial(get_mesh), inputs=[output_frame, output_depth], outputs=[result]
|
348 |
|
349 |
example_files = os.listdir('examples')
|
350 |
example_files.sort()
|
|
|
331 |
processed_video = gr.Video(label="Output Video", format="mp4")
|
332 |
processed_zip = gr.File(label="Output Archive")
|
333 |
result = gr.Model3D(label="3D Mesh", clear_color=[0.5, 0.5, 0.5, 0.0], camera_position=[0, 90, 0])
|
334 |
+
html = gr.HTML(value="<label for='zoom'>Zoom</label> <input id='zoom' type='range' style='width:256px;height:1em;' min='0.157' max='1.57' step='0.001' oninput='BABYLON.Engine.LastCreatedScene.getNodes()[1].material.pointSize=Math.round(Math.log2(Math.PI/this.value));BABYLON.Engine.LastCreatedScene.activeCamera.fov=this.value;this.parentNode.childNodes[2].innerText=BABYLON.Engine.LastCreatedScene.activeCamera.fov;'/> <span>0.8</span>")
|
335 |
+
camera = gr.HTML(value="<a href='#' onclick=\"BABYLON.Engine.LastCreatedScene.activeCamera.radius=0;\">reset camera</a>")
|
336 |
+
fxaa = gr.HTML(value="<a href='#' onclick=\"var postProcess = new BABYLON.FxaaPostProcess('fxaa', 1.0, BABYLON.Engine.LastCreatedScene.activeCamera);\">fxaa</a>")
|
337 |
canvas = gr.HTML(value="<a href='#' onclick=\"this.innerText=document.getElementsByClassName('model3D')[0].getElementsByTagName('canvas')[0].getContext('webgl2');\">webgl2</a>")
|
338 |
render = gr.Button("Render")
|
339 |
|
|
|
345 |
return output_video_path
|
346 |
|
347 |
submit.click(on_submit, inputs=[input_video, model_type], outputs=[processed_video, processed_zip, output_frame, output_depth])
|
348 |
+
render.click(partial(get_mesh), inputs=[output_frame, output_depth], outputs=[result])
|
349 |
|
350 |
example_files = os.listdir('examples')
|
351 |
example_files.sort()
|