annabossler commited on
Commit
e23f83d
verified
1 Parent(s): 3cf0050

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -11
app.py CHANGED
@@ -1,13 +1,6 @@
1
- import os
2
- os.environ["TORCH_DYNAMO_DISABLE"] = "1"
3
- import tempfile
4
- import numpy as np
5
- import gradio as gr
6
- from ase.io import read, write
7
- from ase.io.trajectory import Trajectory
8
- from gradio_molecule3d import Molecule3D
9
- from simulation_scripts_orbmol import load_orbmol_model, run_md_simulation, run_relaxation_simulation
10
- import hashlib
11
 
12
  # Build and install gradio_molecule3d
13
  print("Building gradio_molecule3d...")
@@ -17,8 +10,17 @@ whl_file = list((Path(__file__).parent / "gradio_molecule3d" / "dist").glob("*.w
17
  subprocess.run([sys.executable, "-m", "pip", "install", str(whl_file)], check=True)
18
  print("gradio_molecule3d installed successfully")
19
 
20
- # Let麓s import it
 
 
 
 
 
 
 
21
  from gradio_molecule3d import Molecule3D
 
 
22
 
23
  # ==== Configuraci贸n Molecule3D ====
24
  DEFAULT_MOLECULAR_REPRESENTATIONS = [
 
1
+ import subprocess
2
+ import sys
3
+ from pathlib import Path
 
 
 
 
 
 
 
4
 
5
  # Build and install gradio_molecule3d
6
  print("Building gradio_molecule3d...")
 
10
  subprocess.run([sys.executable, "-m", "pip", "install", str(whl_file)], check=True)
11
  print("gradio_molecule3d installed successfully")
12
 
13
+ # Fixing order of imports
14
+ import os
15
+ os.environ["TORCH_DYNAMO_DISABLE"] = "1"
16
+ import tempfile
17
+ import numpy as np
18
+ import gradio as gr
19
+ from ase.io import read, write
20
+ from ase.io.trajectory import Trajectory
21
  from gradio_molecule3d import Molecule3D
22
+ from simulation_scripts_orbmol import load_orbmol_model, run_md_simulation, run_relaxation_simulation
23
+ import hashlib
24
 
25
  # ==== Configuraci贸n Molecule3D ====
26
  DEFAULT_MOLECULAR_REPRESENTATIONS = [