Alexvatti commited on
Commit
973be08
·
verified ·
1 Parent(s): e8b5c95

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -12
app.py CHANGED
@@ -153,17 +153,16 @@ elif menu == "3️⃣ ATS Match Score":
153
  )
154
 
155
  result = crew.kickoff(inputs={"resume_text": resume_text, "job_description": job_description})
156
-
157
- if isinstance(result, str):
158
- # Extract Match Score and Missing Keywords using simple parsing
159
- match_score_line = next((line for line in result.split('\n') if "Match Score" in line), None)
160
- missing_keywords_line = next((line for line in result.split('\n') if "Missing Keywords" in line), None)
161
-
162
- if match_score_line and missing_keywords_line:
163
- st.write("### ✅ ATS Match Result:")
164
- st.write(f"**{match_score_line.strip()}**")
165
- st.write(f"**{missing_keywords_line.strip()}**")
166
- else:
167
- st.warning("Unable to parse the match result properly.")
168
  else:
169
  st.warning("Please upload resume and paste job description.")
 
 
 
153
  )
154
 
155
  result = crew.kickoff(inputs={"resume_text": resume_text, "job_description": job_description})
156
+ extracted_keywords = outputs.tasks_output[0].raw
157
+
158
+ # Then parse extracted_keywords
159
+ match_score_line = next((line for line in extracted_keywords.split('\n') if "Match Score" in line), None)
160
+ missing_keywords_line = next((line for line in extracted_keywords.split('\n') if "Missing Keywords" in line), None)
161
+ st.success("✅ ATS Match Result:")
162
+ st.markdown(f"**{match_score_line.strip()}**")
163
+ st.markdown(f"**{missing_keywords_line.strip()}**")
164
+
 
 
 
165
  else:
166
  st.warning("Please upload resume and paste job description.")
167
+ else:
168
+ st.warning("Invalid Input")