Upload app.py with huggingface_hub
Browse files
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 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
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))
|