simonduerr commited on
Commit
6643ce7
1 Parent(s): df64bda

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -5,6 +5,14 @@ import copy
5
  import os
6
  import torch
7
 
 
 
 
 
 
 
 
 
8
  import time
9
  from argparse import ArgumentParser, Namespace, FileType
10
  from rdkit.Chem import RemoveHs
 
5
  import os
6
  import torch
7
 
8
+ import subprocess
9
+
10
+ ## dirty hack since torch_geometric depends on torch being installed already, so we can't install both via requirements
11
+ try:
12
+ import torch_geometric
13
+ except ImportError:
14
+ subprocess.call(['pip', 'install', 'torch-scatter', 'torch-sparse', 'torch-cluster', 'torch-spline-conv', 'torch-geometric', '-f', 'https://data.pyg.org/whl/torch-1.12.0+cu102.html'])
15
+
16
  import time
17
  from argparse import ArgumentParser, Namespace, FileType
18
  from rdkit.Chem import RemoveHs