muhammadsalmanalfaridzi commited on
Commit
d422d60
·
verified ·
1 Parent(s): 8aeca3c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -89,8 +89,11 @@ def process_resume(file, jd_string):
89
  Process the uploaded resume and job description, optimize it, and return the result.
90
  """
91
  try:
 
 
 
92
  # Convert file to Markdown using MarkItDown
93
- original_md = md_converter.convert(file.name)
94
  original_text = original_md.text_content
95
 
96
  # Save the original resume in Markdown format
@@ -170,4 +173,4 @@ with gr.Blocks() as app:
170
  )
171
  export_button.click(export_resume, inputs=[after_md], outputs=[export_result])
172
 
173
- app.launch()
 
89
  Process the uploaded resume and job description, optimize it, and return the result.
90
  """
91
  try:
92
+ # Read file content
93
+ file_content = file.read().decode("utf-8") # Assuming file is in text format (e.g., Markdown)
94
+
95
  # Convert file to Markdown using MarkItDown
96
+ original_md = md_converter.convert(file_content)
97
  original_text = original_md.text_content
98
 
99
  # Save the original resume in Markdown format
 
173
  )
174
  export_button.click(export_resume, inputs=[after_md], outputs=[export_result])
175
 
176
+ app.launch()