freealise commited on
Commit
a6fbbb9
1 Parent(s): 37a3b0c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -607,7 +607,7 @@ with gr.Blocks(css=css) as demo:
607
  with gr.Accordion(label="Locations", open=False):
608
  offset = gr.HTML(value="""<label for='displace'>Displace</label><input id='displace' type='range' style='width:256px;height:1em;' value='0' min='0' max='255' step='1' oninput='
609
  try {
610
- var txt = document.getElementById(\"coords\").getElementsByTagName(\"textarea\")[0].value.replace(/\'/g, \"&quot;\");
611
  alert(txt);
612
  var json = JSON.parse(txt);
613
  BABYLON.Engine.LastCreatedScene.getNodes()[parseInt(document.getElementById(\"fnum\").getElementsByTagName(\"input\")[0].value)+1].position.x = this.value * json[parseInt(document.getElementById(\"fnum\").getElementsByTagName(\"input\")[0].value)].lat;
@@ -885,7 +885,7 @@ with gr.Blocks(css=css) as demo:
885
  # Process the video and get the path of the output video
886
  output_video_path = make_video(uploaded_video,encoder=model_type)
887
 
888
- return output_video_path + (locations,)
889
 
890
  submit.click(on_submit, inputs=[input_video, model_type, coords], outputs=[processed_video, processed_zip, output_frame, output_mask, coords])
891
  render.click(partial(get_mesh), inputs=[output_frame, output_mask, blur_in, load_all], outputs=[result])
 
607
  with gr.Accordion(label="Locations", open=False):
608
  offset = gr.HTML(value="""<label for='displace'>Displace</label><input id='displace' type='range' style='width:256px;height:1em;' value='0' min='0' max='255' step='1' oninput='
609
  try {
610
+ var txt = document.getElementById(\"coords\").getElementsByTagName(\"textarea\")[0].value;
611
  alert(txt);
612
  var json = JSON.parse(txt);
613
  BABYLON.Engine.LastCreatedScene.getNodes()[parseInt(document.getElementById(\"fnum\").getElementsByTagName(\"input\")[0].value)+1].position.x = this.value * json[parseInt(document.getElementById(\"fnum\").getElementsByTagName(\"input\")[0].value)].lat;
 
885
  # Process the video and get the path of the output video
886
  output_video_path = make_video(uploaded_video,encoder=model_type)
887
 
888
+ return output_video_path + (json.dumps(locations),)
889
 
890
  submit.click(on_submit, inputs=[input_video, model_type, coords], outputs=[processed_video, processed_zip, output_frame, output_mask, coords])
891
  render.click(partial(get_mesh), inputs=[output_frame, output_mask, blur_in, load_all], outputs=[result])