Skip to content

Commit f0f4e7d

Browse files
committed
Fix model path
1 parent 1311692 commit f0f4e7d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

training/test_train.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,18 @@
3535
def model(request):
3636
# Load dataset
3737
data = None
38+
prefix = ""
3839
try:
3940
data = pd.read_csv(request.param["dataset"])
4041
except FileNotFoundError:
4142
# Check if the dataset is in the parent directory
42-
data = pd.read_csv("../" + request.param["dataset"])
43+
prefix = "../"
44+
data = pd.read_csv(prefix + request.param["dataset"])
4345

4446
# Load TF model from SavedModel
45-
sqli_model = TFSMLayer(request.param["model_path"], call_endpoint="serving_default")
47+
sqli_model = TFSMLayer(
48+
prefix + request.param["model_path"], call_endpoint="serving_default"
49+
)
4650

4751
# Tokenize the sample
4852
tokenizer = Tokenizer(num_words=MAX_WORDS, filters="")

0 commit comments

Comments
 (0)