moldenhof commited on
Commit
ebf43f7
·
1 Parent(s): 9acb06c

add deps to app

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -24,5 +24,13 @@ from rdkit import Chem
24
  from rdkit.Chem import AllChem
25
  from rdkit import DataStructs
26
 
 
 
 
 
 
 
 
 
27
  x = st.slider('Select a value')
28
  st.write(x, 'squared is', x * x)
 
24
  from rdkit.Chem import AllChem
25
  from rdkit import DataStructs
26
 
27
+ model_cls = RCNN
28
+ experiment_path_atoms="./models/atoms_model/"
29
+ dir_list = os.listdir(experiment_path_atoms)
30
+ dir_list = [os.path.join(experiment_path_atoms,f) for f in dir_list]
31
+ dir_list.sort(key=os.path.getctime, reverse=True)
32
+ checkpoint_file_atoms = [f for f in dir_list if "ckpt" in f][0]
33
+ model_atom = model_cls.load_from_checkpoint(checkpoint_file_atoms)
34
+ model_atom.model.roi_heads.score_thresh = 0.65
35
  x = st.slider('Select a value')
36
  st.write(x, 'squared is', x * x)