Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -18,11 +18,11 @@ def predict(model_version, dataset_name, input_type, file=None, smiles=None):
|
|
18 |
if model_version == "Vanilla Chemprop":
|
19 |
model_dir = "chemprop"
|
20 |
model_path = f"model_weight/{dataset_name}/best_unbalanced.pt"
|
21 |
-
script_path = "chemprop
|
22 |
else:
|
23 |
model_dir = "chemprop_updated"
|
24 |
model_path = f"model_weight/{dataset_name}/best_bert_fusion.pt"
|
25 |
-
script_path = "chemprop_updated
|
26 |
|
27 |
# Prepare input file
|
28 |
if input_type == "Upload CSV":
|
@@ -36,7 +36,7 @@ def predict(model_version, dataset_name, input_type, file=None, smiles=None):
|
|
36 |
|
37 |
# Run prediction command
|
38 |
cmd = [
|
39 |
-
"python",
|
40 |
"--test-path", input_path,
|
41 |
"--model-paths", model_path,
|
42 |
"--smiles-columns", "smiles"
|
|
|
18 |
if model_version == "Vanilla Chemprop":
|
19 |
model_dir = "chemprop"
|
20 |
model_path = f"model_weight/{dataset_name}/best_unbalanced.pt"
|
21 |
+
script_path = "chemprop/chemprop/cli/predict"
|
22 |
else:
|
23 |
model_dir = "chemprop_updated"
|
24 |
model_path = f"model_weight/{dataset_name}/best_bert_fusion.pt"
|
25 |
+
script_path = "chemprop-updated/chemprop_updated/cli/predict"
|
26 |
|
27 |
# Prepare input file
|
28 |
if input_type == "Upload CSV":
|
|
|
36 |
|
37 |
# Run prediction command
|
38 |
cmd = [
|
39 |
+
"python",script_path,
|
40 |
"--test-path", input_path,
|
41 |
"--model-paths", model_path,
|
42 |
"--smiles-columns", "smiles"
|