diff --git a/paddlehub/io/parser.py b/paddlehub/io/parser.py index a3c7b4aaf50c32360d159339f62a40c2304adc5b..924cd3a0d69f7f5ce46a066b507f1fe6bacfd309 100644 --- a/paddlehub/io/parser.py +++ b/paddlehub/io/parser.py @@ -30,7 +30,7 @@ class CSVFileParser(object): pass def parse(self, csv_file): - with codecs.open(txt_file, "r", sys.stdin.encoding) as file: + with codecs.open(csv_file, "r", sys.stdin.encoding) as file: content = file.read() content = content.split('\n') self.title = content[0].split(',') @@ -57,7 +57,8 @@ class YAMLFileParser(object): pass def parse(self, yaml_file): - with codecs.open(txt_file, "r", sys.stdin.encoding) as file: + with codecs.open(yaml_file, "r", sys.stdin.encoding) as file: + print("come to here") content = file.read() return yaml.load(content, Loader=yaml.BaseLoader)