Skip to content

Commit

Permalink
updating readme [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
GemmaTuron authored and ersilia-bot committed Mar 11, 2024
1 parent 8fd212e commit 69e8464
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
6 changes: 0 additions & 6 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
*.csv filter=lfs diff=lfs merge=lfs -text
*.h5 filter=lfs diff=lfs merge=lfs -text
*.joblib filter=lfs diff=lfs merge=lfs -text
*.pkl filter=lfs diff=lfs merge=lfs -text
*.pt filter=lfs diff=lfs merge=lfs -text
*.tsv filter=lfs diff=lfs merge=lfs -text
*.pkl.gz filter=lfs diff=lfs merge=lfs -text
3 changes: 0 additions & 3 deletions model/checkpoints/checkpoints.joblib

This file was deleted.

3 changes: 0 additions & 3 deletions model/framework/input.csv

This file was deleted.

20 changes: 15 additions & 5 deletions src/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@ def load_model(framework_dir, checkpoints_dir):
mdl.load(framework_dir, checkpoints_dir)
return mdl

def String(x):
x = str(x)
if not x:
return None
if x == "nan":
return None
if x == "null":
return None
if x == "False":
return None
if x == "None":
return None
return x


class Model(object):
def __init__(self):
Expand Down Expand Up @@ -64,12 +78,8 @@ def run(self, smiles_list):
reader = csv.reader(f)
h = next(reader)
R = []
samples = []
for r in reader:
for x in r:
sample = str(x)
samples.append(sample)
R += [{"outcome": samples}]
R += [{"outcome": [String(x) for x in r]}]

meta = {
"outcome": h
Expand Down

0 comments on commit 69e8464

Please sign in to comment.