nam194 commited on
Commit
90b529f
1 Parent(s): 460c285

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -74,10 +74,6 @@ key_list = ["person_name","dob_value","gender_value","phonenumber_value","email_
74
  "designation_value","degree_value","skill_value"]
75
  label2id = {v: k for k, v in id2label.items()}
76
  def pred_resume(pdf_path) -> dict:
77
- print("\n--------------------------------------------------------------------------------------------------------------------------\n")
78
- print("New resume inference at: ", datetime.utcnow())
79
- print("Pdf name: ", pdf_path.name)
80
- print("\n--------------------------------------------------------------------------------------------------------------------------\n")
81
  global key_list, device
82
  result = {}
83
  for i in key_list:
@@ -148,6 +144,11 @@ def pred_resume(pdf_path) -> dict:
148
  if pred in key_list:
149
  result[pred].append(text_reverse[str(box)])
150
  result = {k: list(set(v)) for k, v in result.items()}
 
 
 
 
 
151
  return str(result)
152
  def norm(result: str) -> str:
153
  result = ast.literal_eval(result)
 
74
  "designation_value","degree_value","skill_value"]
75
  label2id = {v: k for k, v in id2label.items()}
76
  def pred_resume(pdf_path) -> dict:
 
 
 
 
77
  global key_list, device
78
  result = {}
79
  for i in key_list:
 
144
  if pred in key_list:
145
  result[pred].append(text_reverse[str(box)])
146
  result = {k: list(set(v)) for k, v in result.items()}
147
+ print("\n--------------------------------------------------------------------------------------------------------------------------\n")
148
+ print("New resume inference at: ", datetime.utcnow())
149
+ print("Pdf name: ", pdf_path.name)
150
+ print("Result: ", result)
151
+ print("\n--------------------------------------------------------------------------------------------------------------------------\n")
152
  return str(result)
153
  def norm(result: str) -> str:
154
  result = ast.literal_eval(result)