Skip to content

Commit

Permalink
Load dataset from parent dir
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafa committed Oct 17, 2024
1 parent 81e09aa commit 1311692
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion training/test_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@
)
def model(request):
# Load dataset
data = pd.read_csv(request.param["dataset"])
data = None
try:
data = pd.read_csv(request.param["dataset"])
except FileNotFoundError:
# Check if the dataset is in the parent directory
data = pd.read_csv("../" + request.param["dataset"])

# Load TF model from SavedModel
sqli_model = TFSMLayer(request.param["model_path"], call_endpoint="serving_default")
Expand Down

0 comments on commit 1311692

Please sign in to comment.