preprocess.py 403 B

123456789101112131415
  1. import argparse
  2. import yaml
  3. from preprocessor.preprocessor import Preprocessor
  4. if __name__ == "__main__":
  5. parser = argparse.ArgumentParser()
  6. parser.add_argument("config", type=str, help="path to preprocess.yaml")
  7. args = parser.parse_args()
  8. config = yaml.load(open(args.config, "r"), Loader=yaml.FullLoader)
  9. preprocessor = Preprocessor(config)
  10. preprocessor.build_from_path()