Vaibhav84 commited on
Commit
296fd89
·
1 Parent(s): db967a4
Files changed (2) hide show
  1. SkillMatcher.py +2 -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].split('.')[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
- return SkillMatch.SkillMatcher(model,db_params,JobId)
 
 
 
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"})