freealise commited on
Commit
ae11e4f
·
verified ·
1 Parent(s): b16f658

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -639,6 +639,7 @@ async(c, o, p, d, n, m)=>{
639
  BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].material.useAlphaFromDiffuseTexture = true;
640
  BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].applyDisplacementMap(m[o_[j]].url, 0, 255, function(m){try{alert(BABYLON.Engine.Version);}catch(e){alert(e);}}, null, null, true, function(e){alert(e);});
641
  }
 
642
  const editControl = new EditControl(BABYLON.Engine.LastCreatedScene.meshes[parseInt(document.getElementById("cnum").value)], BABYLON.Engine.LastCreatedScene.activeCamera, document.getElementById("model3D").getElementsByTagName("canvas")[0], 1.0, true, 0.02);
643
  editControl.enableTranslation();
644
 
@@ -795,12 +796,8 @@ css = """
795
  """
796
 
797
  head = """
798
- <script src='https://cdn.babylonjs.com/babylon.js'></script>
799
  <script src='https://code.jquery.com/pep/0.4.2/pep.js'></script>
800
  <script src='https://huggingface.co/spaces/freealise/Depth-Anything-V2-Video/resolve/main/EditControl.js'></script>
801
- <script type='text/javascript'>
802
- window.EditControl = EditControl;
803
- </script>
804
  """
805
 
806
  title = "# Depth Anything V2 Video"
 
639
  BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].material.useAlphaFromDiffuseTexture = true;
640
  BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].applyDisplacementMap(m[o_[j]].url, 0, 255, function(m){try{alert(BABYLON.Engine.Version);}catch(e){alert(e);}}, null, null, true, function(e){alert(e);});
641
  }
642
+ loadEditControl();
643
  const editControl = new EditControl(BABYLON.Engine.LastCreatedScene.meshes[parseInt(document.getElementById("cnum").value)], BABYLON.Engine.LastCreatedScene.activeCamera, document.getElementById("model3D").getElementsByTagName("canvas")[0], 1.0, true, 0.02);
644
  editControl.enableTranslation();
645
 
 
796
  """
797
 
798
  head = """
 
799
  <script src='https://code.jquery.com/pep/0.4.2/pep.js'></script>
800
  <script src='https://huggingface.co/spaces/freealise/Depth-Anything-V2-Video/resolve/main/EditControl.js'></script>
 
 
 
801
  """
802
 
803
  title = "# Depth Anything V2 Video"