Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,6 +9,17 @@ 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 |
# ==== Configuraci贸n Molecule3D ====
|
| 13 |
DEFAULT_MOLECULAR_REPRESENTATIONS = [
|
| 14 |
{
|
|
|
|
| 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...")
|
| 14 |
+
subprocess.run(["gradio", "cc", "build"], cwd=Path(__file__).parent / "gradio_molecule3d/", check=True)
|
| 15 |
+
print("Installing gradio_molecule3d...")
|
| 16 |
+
whl_file = list((Path(__file__).parent / "gradio_molecule3d" / "dist").glob("*.whl"))[0]
|
| 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 = [
|
| 25 |
{
|