freealise commited on
Commit
b966fba
1 Parent(s): 9e41914

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -744,14 +744,14 @@ with gr.Blocks(css=css, js=js) as demo:
744
 
745
  with gr.Row():
746
  with gr.Column():
747
- input_json = gr.Textbox(elem_id="json_in", value="{}", label="JSON")
748
  input_url = gr.Textbox(elem_id="url_in", value="./examples/streetview.mp4", label="URL")
749
  input_video = gr.Video(label="Input Video", format="mp4")
750
  input_url.input(fn=loadfile, inputs=[input_url], outputs=[input_video])
751
  submit = gr.Button("Submit")
752
- output_frame = gr.Gallery(label="Frames", preview=True, columns=8192)
753
  output_switch = gr.Checkbox(label="Show depths")
754
- output_depth = gr.Files(label="Depths")
755
  output_switch.input(fn=switch_rows, inputs=[output_switch], outputs=[output_frame])
756
  optimize_switch = gr.Checkbox(label="Optimize")
757
  bgcolor = gr.Textbox(elem_id="bgcolor", value="[127, 127, 127, 255]", label="Background color", interactive=False)
@@ -808,8 +808,8 @@ with gr.Blocks(css=css, js=js) as demo:
808
  reset.click(fn=reset_mask, inputs=None, outputs=[output_mask, output_depth])
809
  with gr.Column():
810
  model_type = gr.Dropdown([("small", "vits"), ("base", "vitb"), ("large", "vitl")], type="value", value="vits", label='Model Type')
811
- processed_video = gr.Video(label="Output Video", format="mp4")
812
- processed_zip = gr.File(label="Output Archive")
813
  result = gr.Model3D(label="3D Mesh", clear_color=[0.5, 0.5, 0.5, 0.0], camera_position=[0, 90, 0], zoom_speed=2.0, pan_speed=2.0, interactive=True, elem_id="model3D") #, display_mode="point_cloud"
814
  svg_in = gr.HTML(value="""<svg id='svg_in' height='32' width='256' viewBox='0 0 256 32' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' style='touch-action:none;background-color:#808080;' onpointerdown='
815
  try{
@@ -895,7 +895,7 @@ with gr.Blocks(css=css, js=js) as demo:
895
  this.parentNode.childNodes[2].innerText = this.value;
896
  '/><span>1</span>""")
897
  with gr.Accordion(label="Blur levels", open=False):
898
- blur_in = gr.Textbox(label="Kernel size", show_label=False, value="1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1")
899
  with gr.Accordion(label="Locations", open=False):
900
  offset = gr.HTML(value="""<input type='text' id='kbrd' onpointerdown='this.style.color = \"white\";' onpointerup='this.style.color = \"auto\";' onpointermove='
901
  try {
@@ -1059,7 +1059,7 @@ with gr.Blocks(css=css, js=js) as demo:
1059
  coords = gr.Textbox(elem_id="coords", value=example_coords, label="Coordinates", interactive=False)
1060
  mesh_order = gr.Textbox(elem_id="order", value="", label="Order", interactive=False)
1061
 
1062
- result_file = gr.File(elem_id="file3D", label="3D file")
1063
  html = gr.HTML(value="""<label for='zoom'>Zoom</label><input id='zoom' type='range' style='width:256px;height:1em;' value='0.8' min='0.157' max='1.57' step='0.001' oninput='
1064
  if (!BABYLON.Engine.LastCreatedScene.activeCamera.metadata) {
1065
  var evt = document.createEvent(\"Event\");
 
744
 
745
  with gr.Row():
746
  with gr.Column():
747
+ input_json = gr.Textbox(elem_id="json_in", value="{}", label="JSON", interactive=False)
748
  input_url = gr.Textbox(elem_id="url_in", value="./examples/streetview.mp4", label="URL")
749
  input_video = gr.Video(label="Input Video", format="mp4")
750
  input_url.input(fn=loadfile, inputs=[input_url], outputs=[input_video])
751
  submit = gr.Button("Submit")
752
+ output_frame = gr.Gallery(label="Frames", preview=True, columns=8192, interactive=False)
753
  output_switch = gr.Checkbox(label="Show depths")
754
+ output_depth = gr.Files(label="Depths", interactive=False)
755
  output_switch.input(fn=switch_rows, inputs=[output_switch], outputs=[output_frame])
756
  optimize_switch = gr.Checkbox(label="Optimize")
757
  bgcolor = gr.Textbox(elem_id="bgcolor", value="[127, 127, 127, 255]", label="Background color", interactive=False)
 
808
  reset.click(fn=reset_mask, inputs=None, outputs=[output_mask, output_depth])
809
  with gr.Column():
810
  model_type = gr.Dropdown([("small", "vits"), ("base", "vitb"), ("large", "vitl")], type="value", value="vits", label='Model Type')
811
+ processed_video = gr.Video(label="Output Video", format="mp4", interactive=False)
812
+ processed_zip = gr.File(label="Output Archive", interactive=False)
813
  result = gr.Model3D(label="3D Mesh", clear_color=[0.5, 0.5, 0.5, 0.0], camera_position=[0, 90, 0], zoom_speed=2.0, pan_speed=2.0, interactive=True, elem_id="model3D") #, display_mode="point_cloud"
814
  svg_in = gr.HTML(value="""<svg id='svg_in' height='32' width='256' viewBox='0 0 256 32' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' style='touch-action:none;background-color:#808080;' onpointerdown='
815
  try{
 
895
  this.parentNode.childNodes[2].innerText = this.value;
896
  '/><span>1</span>""")
897
  with gr.Accordion(label="Blur levels", open=False):
898
+ blur_in = gr.Textbox(label="Kernel size", show_label=False, interactive=False, value="1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1")
899
  with gr.Accordion(label="Locations", open=False):
900
  offset = gr.HTML(value="""<input type='text' id='kbrd' onpointerdown='this.style.color = \"white\";' onpointerup='this.style.color = \"auto\";' onpointermove='
901
  try {
 
1059
  coords = gr.Textbox(elem_id="coords", value=example_coords, label="Coordinates", interactive=False)
1060
  mesh_order = gr.Textbox(elem_id="order", value="", label="Order", interactive=False)
1061
 
1062
+ result_file = gr.File(elem_id="file3D", label="3D file", interactive=False)
1063
  html = gr.HTML(value="""<label for='zoom'>Zoom</label><input id='zoom' type='range' style='width:256px;height:1em;' value='0.8' min='0.157' max='1.57' step='0.001' oninput='
1064
  if (!BABYLON.Engine.LastCreatedScene.activeCamera.metadata) {
1065
  var evt = document.createEvent(\"Event\");