changes
Browse files- SkillMatcher.py +2 -2
- app.py +4 -1
SkillMatcher.py
CHANGED
@@ -94,13 +94,13 @@ class SkillMatch:
|
|
94 |
query = "select filename from coursemaster where masterid = " + str(CourseId)
|
95 |
df = pd.read_sql_query(query, conn)
|
96 |
try:
|
97 |
-
MatchId = df.iat[0,0]
|
98 |
except:
|
99 |
print(CourseId)
|
100 |
print("------------------------Beta Results - " + MatchId)
|
101 |
cursor_obj.close()
|
102 |
conn.close()
|
103 |
-
return MatchId
|
104 |
|
105 |
def tuple_to_int(tup):
|
106 |
if len(tup) == 1:
|
|
|
94 |
query = "select filename from coursemaster where masterid = " + str(CourseId)
|
95 |
df = pd.read_sql_query(query, conn)
|
96 |
try:
|
97 |
+
MatchId = df.iat[0,0]
|
98 |
except:
|
99 |
print(CourseId)
|
100 |
print("------------------------Beta Results - " + MatchId)
|
101 |
cursor_obj.close()
|
102 |
conn.close()
|
103 |
+
return str(MatchId) + ";" + str(TopScore) + ";" + str(CourseId)
|
104 |
|
105 |
def tuple_to_int(tup):
|
106 |
if len(tup) == 1:
|
app.py
CHANGED
@@ -109,7 +109,10 @@ def UploadProfile(file: bytes = File(...), FileName: str = "sample.pdf"):
|
|
109 |
|
110 |
@app.get("/GetMatchProfileByJobId/")
|
111 |
def GetMatchProfileByJobId(JobId : int):
|
112 |
-
|
|
|
|
|
|
|
113 |
|
114 |
|
115 |
#return JSONResponse(content={"message": "Here's your interdimensional portal." , "mes1":"data2"})
|
|
|
109 |
|
110 |
@app.get("/GetMatchProfileByJobId/")
|
111 |
def GetMatchProfileByJobId(JobId : int):
|
112 |
+
data = SkillMatch.SkillMatcher(model,db_params,JobId)
|
113 |
+
dataJson = {'Data':['Best Resume Fit', 'Score', 'ProfileID'], 'Values':[data[0], data[1], data[2]]}
|
114 |
+
df = pd.DataFrame(dataJson)
|
115 |
+
return parse_csv(df)
|
116 |
|
117 |
|
118 |
#return JSONResponse(content={"message": "Here's your interdimensional portal." , "mes1":"data2"})
|