Chia Woon Yap commited on
Commit
ad1f645
·
verified ·
1 Parent(s): 4f574d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -174,7 +174,7 @@ def process_document(file):
174
  if file_extension == ".pdf":
175
  content = extract_text_from_pdf(file.name)
176
  elif file_extension == ".docx":
177
- content = extract_text_from_docx(file.name)
178
  else:
179
  return "Error: Unsupported file type. Please upload a PDF or DOCX file."
180
  return content
@@ -222,7 +222,7 @@ def check_hallucinations(original_text, generated_resume, job_scope):
222
  response = verification_model.invoke([HumanMessage(content=verification_prompt)])
223
  return response.content
224
 
225
- # Enhanced function to handle resume customization with AQR and verification
226
  def customize_resume_with_verification(job_scope, resume_file, temperature, enable_verification=True):
227
  # Extract and process resume text
228
  resume_text = process_document(resume_file)
@@ -243,7 +243,7 @@ def customize_resume_with_verification(job_scope, resume_file, temperature, enab
243
  def resume_customizer():
244
  with gr.Blocks() as app:
245
  gr.Markdown("# 📄 AI Resume Customizer with Attentive Reasoning")
246
- gr.Markdown("Generate hallucination-free customized resumes using Attentive Reasoning Query (AQR)")
247
 
248
  with gr.Row():
249
  with gr.Column():
 
174
  if file_extension == ".pdf":
175
  content = extract_text_from_pdf(file.name)
176
  elif file_extension == ".docx":
177
+ content =u extract_text_from_docx(file.name)
178
  else:
179
  return "Error: Unsupported file type. Please upload a PDF or DOCX file."
180
  return content
 
222
  response = verification_model.invoke([HumanMessage(content=verification_prompt)])
223
  return response.content
224
 
225
+ # Enhanced function to handle resume customization with ARQ and verification
226
  def customize_resume_with_verification(job_scope, resume_file, temperature, enable_verification=True):
227
  # Extract and process resume text
228
  resume_text = process_document(resume_file)
 
243
  def resume_customizer():
244
  with gr.Blocks() as app:
245
  gr.Markdown("# 📄 AI Resume Customizer with Attentive Reasoning")
246
+ gr.Markdown("Generate hallucination-free customized resumes using Attentive Reasoning Query")
247
 
248
  with gr.Row():
249
  with gr.Column():