Vaibhav84 commited on
Commit
1e4a1c0
·
1 Parent(s): bd2686a
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -94,6 +94,7 @@ def ExtractSkills(skill_data: SkillDetails):
94
  return skill_data
95
 
96
  @app.post("/uploadJobDescription/")
97
- def create_upload_file(file: UploadFile):
98
- print(file.read())
99
- return {"fileContents": file.read()}
 
 
94
  return skill_data
95
 
96
  @app.post("/uploadJobDescription/")
97
+ def create_upload_file(file: bytes = File(...)):
98
+ content = file.decode('utf-8')
99
+ lines = content.split('\n')
100
+ return {"content": lines}