Spaces:
Sleeping
Sleeping
Changes
Browse files
app.py
CHANGED
@@ -107,10 +107,15 @@ def UploadProfileFromFile(file: bytes = File(...), FileName: str = "sample.pdf"
|
|
107 |
df = pd.DataFrame(data)
|
108 |
return parse_csv(df)
|
109 |
|
|
|
|
|
|
|
|
|
110 |
@app.post("/UploadProfileOpenText/")
|
111 |
-
def UploadProfileOpenText(
|
|
|
112 |
#text= ExtractContentFromFile.ExtractDataFromFile(FileName,file)
|
113 |
-
returnID = UploadOpenFile.uploadFile(text,
|
114 |
returnSkills = SkillExtractorDetails.SkillExtract(db_params,skill_extractor,returnID,False)
|
115 |
details = returnSkills.split('@')
|
116 |
data = {'Data':['Required Skills', 'Soft Skills', 'Good to have Skills'], 'Values':[details[0], details[1], details[2]]}
|
|
|
107 |
df = pd.DataFrame(data)
|
108 |
return parse_csv(df)
|
109 |
|
110 |
+
class FileText(BaseModel):
|
111 |
+
text: int
|
112 |
+
fname: str
|
113 |
+
|
114 |
@app.post("/UploadProfileOpenText/")
|
115 |
+
def UploadProfileOpenText(indata : FileText):
|
116 |
+
|
117 |
#text= ExtractContentFromFile.ExtractDataFromFile(FileName,file)
|
118 |
+
returnID = UploadOpenFile.uploadFile(indata.text,indata.fname,db_params,False)
|
119 |
returnSkills = SkillExtractorDetails.SkillExtract(db_params,skill_extractor,returnID,False)
|
120 |
details = returnSkills.split('@')
|
121 |
data = {'Data':['Required Skills', 'Soft Skills', 'Good to have Skills'], 'Values':[details[0], details[1], details[2]]}
|