liuganghuggingface commited on
Commit
05d2c9d
·
verified ·
1 Parent(s): 879346c

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -14,12 +14,12 @@ ATOM_SYMBOLS = ['C', 'N', 'O', 'H']
14
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
15
 
16
  path = 'model_labeled'
17
- # model = GraphDiT(
18
- # model_config_path=f"{path}/config.yaml",
19
- # data_info_path=f"{path}/data.meta.json",
20
- # model_dtype=torch.float32
21
- # )
22
- # model.to(device)
23
 
24
  def generate_random_smiles(length=10):
25
  return ''.join(random.choices(ATOM_SYMBOLS, k=length))
 
14
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
15
 
16
  path = 'model_labeled'
17
+ model = GraphDiT(
18
+ model_config_path=f"{path}/config.yaml",
19
+ data_info_path=f"{path}/data.meta.json",
20
+ model_dtype=torch.float32
21
+ )
22
+ model.to(device)
23
 
24
  def generate_random_smiles(length=10):
25
  return ''.join(random.choices(ATOM_SYMBOLS, k=length))