Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,6 @@ class CFG():
|
|
22 |
num_return_sequences = 5
|
23 |
seed = 42
|
24 |
|
25 |
-
print('ok')
|
26 |
|
27 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
28 |
|
@@ -35,8 +34,8 @@ def seed_everything(seed=42):
|
|
35 |
torch.backends.cudnn.deterministic = True
|
36 |
seed_everything(seed=CFG.seed)
|
37 |
|
38 |
-
|
39 |
-
|
40 |
tokenizer = AutoTokenizer.from_pretrained(CFG.model_name_or_path, return_tensors='pt')
|
41 |
|
42 |
if CFG.model == 't5':
|
@@ -62,5 +61,4 @@ if type(mol) == None:
|
|
62 |
output += scores
|
63 |
output = [input_compound] + output
|
64 |
output_df = pd.DataFrame(np.array(output).reshape(1, -1), columns=['input'] + [f'{i}th' for i in range(CFG.num_beams)] + ['valid compound'] + [f'{i}th score' for i in range(CFG.num_beams)] + ['valid compound score'])
|
65 |
-
|
66 |
-
print('ok')
|
|
|
22 |
num_return_sequences = 5
|
23 |
seed = 42
|
24 |
|
|
|
25 |
|
26 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
27 |
|
|
|
34 |
torch.backends.cudnn.deterministic = True
|
35 |
seed_everything(seed=CFG.seed)
|
36 |
|
37 |
+
|
38 |
+
st.json(CFG.input_data)
|
39 |
tokenizer = AutoTokenizer.from_pretrained(CFG.model_name_or_path, return_tensors='pt')
|
40 |
|
41 |
if CFG.model == 't5':
|
|
|
61 |
output += scores
|
62 |
output = [input_compound] + output
|
63 |
output_df = pd.DataFrame(np.array(output).reshape(1, -1), columns=['input'] + [f'{i}th' for i in range(CFG.num_beams)] + ['valid compound'] + [f'{i}th score' for i in range(CFG.num_beams)] + ['valid compound score'])
|
64 |
+
st.json(output)
|
|