Karthikeyan commited on
Commit
217ef30
1 Parent(s): 3c8d95f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -76,7 +76,9 @@ class ResumeAnalyser:
76
 
77
  for line in lines:
78
  if line.startswith('Matched Percentage:'):
79
- matched_percentage = line.split(':')[1].strip()
 
 
80
  elif line.startswith('Reason'):
81
  reason = line.split(':')[1].strip()
82
  elif line.startswith('Skills To Improve'):
@@ -86,12 +88,12 @@ class ResumeAnalyser:
86
 
87
 
88
  # Extract the matched percentage using regular expression
89
- match1 = re.search(r"Matched Percentage: (\d+)%", matched_percentage)
90
- matched_Percentage = int(match1.group(1))
91
 
92
  # Creating a pie chart with plotly
93
  labels = ['Matched', 'Remaining']
94
- values = [matched_Percentage, 100 - matched_Percentage]
95
 
96
  fig = go.Figure(data=[go.Pie(labels=labels, values=values)])
97
  # fig.update_layout(title='Matched Percentage')
 
76
 
77
  for line in lines:
78
  if line.startswith('Matched Percentage:'):
79
+ match = re.search(r"Matched Percentage: (\d+)%", line)
80
+ if match:
81
+ matched_percentage = int(match.group(1))
82
  elif line.startswith('Reason'):
83
  reason = line.split(':')[1].strip()
84
  elif line.startswith('Skills To Improve'):
 
88
 
89
 
90
  # Extract the matched percentage using regular expression
91
+ # match1 = re.search(r"Matched Percentage: (\d+)%", matched_percentage)
92
+ # matched_Percentage = int(match1.group(1))
93
 
94
  # Creating a pie chart with plotly
95
  labels = ['Matched', 'Remaining']
96
+ values = [matched_percentage, 100 - matched_percentage]
97
 
98
  fig = go.Figure(data=[go.Pie(labels=labels, values=values)])
99
  # fig.update_layout(title='Matched Percentage')