Spaces:
Running
Running
update
Browse files
app.py
CHANGED
@@ -45,13 +45,13 @@ def main(property: str, smiles: str, smiles_file: str):
|
|
45 |
if "Molformer" in property:
|
46 |
version = property.split(" ")[-1].split("(")[-1].split(")")[0]
|
47 |
property = property.split(" ")[0]
|
|
|
48 |
algo, config = MOLECULE_PROPERTY_PREDICTOR_FACTORY[property.lower()]
|
49 |
kwargs = (
|
50 |
{"algorithm_version": "v0"} if property in MODEL_PROP_DESCRIPTION.keys() else {}
|
51 |
)
|
52 |
-
if property in MOLFORMER_VERSIONS.keys():
|
53 |
kwargs["algorithm_version"] = version
|
54 |
-
|
55 |
model = algo(config(**kwargs))
|
56 |
if smiles is not None and smiles_file is not None:
|
57 |
raise ValueError("Pass either smiles or smiles_file, not both.")
|
|
|
45 |
if "Molformer" in property:
|
46 |
version = property.split(" ")[-1].split("(")[-1].split(")")[0]
|
47 |
property = property.split(" ")[0]
|
48 |
+
print(property, version)
|
49 |
algo, config = MOLECULE_PROPERTY_PREDICTOR_FACTORY[property.lower()]
|
50 |
kwargs = (
|
51 |
{"algorithm_version": "v0"} if property in MODEL_PROP_DESCRIPTION.keys() else {}
|
52 |
)
|
53 |
+
if property.lower() in MOLFORMER_VERSIONS.keys():
|
54 |
kwargs["algorithm_version"] = version
|
|
|
55 |
model = algo(config(**kwargs))
|
56 |
if smiles is not None and smiles_file is not None:
|
57 |
raise ValueError("Pass either smiles or smiles_file, not both.")
|