muhammadsalmanalfaridzi commited on
Commit
62bcdd1
·
verified ·
1 Parent(s): e8f939d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -2
app.py CHANGED
@@ -97,7 +97,7 @@ def process_resume(resume, jd_string):
97
  result = md_converter.convert(resume.name)
98
  resume_string = result.text_content # Get the converted Markdown content
99
  else:
100
- return "File format not supported for conversion to Markdown."
101
 
102
  # Create optimization prompt
103
  prompt = create_prompt(resume_string, jd_string)
@@ -110,7 +110,18 @@ def process_resume(resume, jd_string):
110
  new_resume = response_list[0].strip()
111
  suggestions = "## Additional Suggestions\n\n" + response_list[1].strip() if len(response_list) > 1 else ""
112
 
113
- return resume_string, new_resume, suggestions
 
 
 
 
 
 
 
 
 
 
 
114
 
115
  def export_resume(new_resume):
116
  """
 
97
  result = md_converter.convert(resume.name)
98
  resume_string = result.text_content # Get the converted Markdown content
99
  else:
100
+ return "File format not supported for conversion to Markdown.", "", "", "", "" # Ensure all outputs are returned
101
 
102
  # Create optimization prompt
103
  prompt = create_prompt(resume_string, jd_string)
 
110
  new_resume = response_list[0].strip()
111
  suggestions = "## Additional Suggestions\n\n" + response_list[1].strip() if len(response_list) > 1 else ""
112
 
113
+ # You can use the original resume content to create a file link if needed
114
+ original_resume_path = "resumes/original_resume.md"
115
+ with open(original_resume_path, "w") as f:
116
+ f.write(resume_string)
117
+
118
+ # Create a download path for the optimized resume
119
+ optimized_resume_path = "resumes/optimized_resume.md"
120
+ with open(optimized_resume_path, "w") as f:
121
+ f.write(new_resume)
122
+
123
+ # Return the required outputs (5 values)
124
+ return resume_string, new_resume, original_resume_path, optimized_resume_path, suggestions
125
 
126
  def export_resume(new_resume):
127
  """