moldenhof commited on
Commit
663db57
1 Parent(s): 8ebd139

checking model

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -48,6 +48,7 @@ def atomlenz(modelfile):
48
  dir_list = [os.path.join(experiment_path_atoms,f) for f in dir_list]
49
  dir_list.sort(key=os.path.getctime, reverse=True)
50
  checkpoint_file_atoms = [f for f in dir_list if "ckpt" in f][0]
 
51
  model_atom = model_cls.load_from_checkpoint(checkpoint_file_atoms)
52
  model_atom.model.roi_heads.score_thresh = 0.65
53
  experiment_path_bonds = "./models/bonds_model/"
@@ -250,9 +251,9 @@ selected_model = st.sidebar.selectbox(
250
  ("AtomLenz trained on synthetic data (default)", "AtomLenz for hand-drawn images", "ChemExpert (not available yet)"))
251
 
252
  model_dict = {
253
- "AtomLenz trained on synthetic data (default)" : "synthetic",
254
- "AtomLenz for hand-drawn images" : "real",
255
- "ChemExpert (not available yet)" : "synthetic"
256
 
257
  }
258
 
 
48
  dir_list = [os.path.join(experiment_path_atoms,f) for f in dir_list]
49
  dir_list.sort(key=os.path.getctime, reverse=True)
50
  checkpoint_file_atoms = [f for f in dir_list if "ckpt" in f][0]
51
+ checkpoint_file_atoms=os.path.join(experiment_path_atoms,modelfile)
52
  model_atom = model_cls.load_from_checkpoint(checkpoint_file_atoms)
53
  model_atom.model.roi_heads.score_thresh = 0.65
54
  experiment_path_bonds = "./models/bonds_model/"
 
251
  ("AtomLenz trained on synthetic data (default)", "AtomLenz for hand-drawn images", "ChemExpert (not available yet)"))
252
 
253
  model_dict = {
254
+ "AtomLenz trained on synthetic data (default)" : "synthetic.ckpt",
255
+ "AtomLenz for hand-drawn images" : "real.ckpt",
256
+ "ChemExpert (not available yet)" : "synthetic.ckpt"
257
 
258
  }
259