khrek commited on
Commit
77cdd98
1 Parent(s): fd54b70

Upload main.py

Browse files
Files changed (1) hide show
  1. main.py +4 -2
main.py CHANGED
@@ -7,5 +7,7 @@ class Main():
7
  self.parser = ResumeParser()
8
 
9
  def parse(self, filename):
10
- text = self.reader.read_pdf(filename)
11
- return self.parser.parse(text)
 
 
 
7
  self.parser = ResumeParser()
8
 
9
  def parse(self, filename):
10
+ text = self.reader.read(filename)
11
+ if text is None:
12
+ return {"error": "Unsupported file format"}
13
+ return self.parser.parse(text)