TODO: Add Argument parsing

--dir -> pet images folder
--arch -> CNN Architecture
--dogfile -> File with Dog Names
This commit is contained in:
2025-12-16 19:49:34 +01:00
parent 53b78a41f9
commit 56eac15639

View File

@@ -17,6 +17,7 @@
# Imports python modules # Imports python modules
import argparse import argparse
# TODO 1: Define get_input_args function below please be certain to replace None # TODO 1: Define get_input_args function below please be certain to replace None
# in the return statement with parser.parse_args() parsed argument # in the return statement with parser.parse_args() parsed argument
# collection that you created with this function # collection that you created with this function
@@ -39,10 +40,17 @@ def get_input_args():
parse_args() -data structure that stores the command line arguments object parse_args() -data structure that stores the command line arguments object
""" """
# Create Parse using ArgumentParser # Create Parse using ArgumentParser
parser = argparse.ArgumentParser(description="Identify dog breeds in images")
# Create 3 command line arguments as mentioned above using add_argument() from ArguementParser method # Create 3 command line arguments as mentioned above using add_argument() from ArguementParser method
parser.add_argument(
"-d", "--dir", default="pet_images/", help="path to the pet images folder"
)
parser.add_argument("-a", "--arch", default="vgg", help="CNN Model Architecture")
parser.add_argument(
"-f", "--dogfile", default="dognames.txt", help="Textfile with Dog Names"
)
# Replace None with parser.parse_args() parsed argument collection that # Replace None with parser.parse_args() parsed argument collection that
# you created with this function # you created with this function
return None return parser.parse_args()