Vaibhav84 commited on
Commit
9ce2997
·
1 Parent(s): 8d08b4d
Files changed (1) hide show
  1. app.py +7 -15
app.py CHANGED
@@ -48,22 +48,14 @@ class SkillDetails(BaseModel):
48
  skillid: int
49
  requiredSkills: str
50
  softSkills: str
51
- goodToHaveSkills: str
52
 
53
  class SkillData(BaseModel):
54
- filename: str
55
- requiredSkills: str
56
- softSkills: str
57
- goodToHaveSkills: str
58
-
59
- class FileResponse(BaseModel):
60
- fileid: int
61
- message: str
62
- class FileUploadDetails(BaseModel):
63
- fileData: bytes = File(...)
64
- filename: str
65
 
66
 
 
67
 
68
  nlp = spacy.load("en_core_web_lg")
69
  # init skill extractor
@@ -81,8 +73,8 @@ def parse_csv(df):
81
 
82
 
83
 
84
- @app.post("/uploadJobDescriptionPDF_Fname/")
85
- def process_pdf_file1(file: bytes = File(...), FileName: str = str):
86
  # Save file locally for processing
87
  text =''
88
  print(text)
@@ -106,7 +98,7 @@ def process_pdf_file1(file: bytes = File(...), FileName: str = str):
106
  #skill_data.softSkills = details[1]
107
  #skill_data.goodToHaveSkills = details[1]
108
  # Process saved file
109
- return {"content": details}
110
  @app.get("/ProfileMatch")
111
  def ProfileMatchResults():
112
  dbQuery = "select * from profilematch"
 
48
  skillid: int
49
  requiredSkills: str
50
  softSkills: str
51
+ goodToHaveSkills: str
52
 
53
  class SkillData(BaseModel):
54
+ filename: str
55
+
 
 
 
 
 
 
 
 
 
56
 
57
 
58
+
59
 
60
  nlp = spacy.load("en_core_web_lg")
61
  # init skill extractor
 
73
 
74
 
75
 
76
+ @app.post("/uploadJobDescription/")
77
+ def uploadJobDescription(file: bytes = File(...), FileName: str = str,test :SkillData=SkillData):
78
  # Save file locally for processing
79
  text =''
80
  print(text)
 
98
  #skill_data.softSkills = details[1]
99
  #skill_data.goodToHaveSkills = details[1]
100
  # Process saved file
101
+ return {"content": test}
102
  @app.get("/ProfileMatch")
103
  def ProfileMatchResults():
104
  dbQuery = "select * from profilematch"