Spaces:
Sleeping
Sleeping
Chia Woon Yap
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -126,7 +126,7 @@ def clean_response(response):
|
|
| 126 |
cleaned_text = re.sub(r"\[Source:.*?\]", "", cleaned_text) # Remove source markers from final output
|
| 127 |
return cleaned_text.strip()
|
| 128 |
|
| 129 |
-
# Enhanced function with
|
| 130 |
def generate_resume_with_aqr(job_scope, resume_text, temperature):
|
| 131 |
# Initialize Chat Model with lower temperature for more factual output
|
| 132 |
chat_model = ChatGroq(
|
|
@@ -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 =
|
| 178 |
else:
|
| 179 |
return "Error: Unsupported file type. Please upload a PDF or DOCX file."
|
| 180 |
return content
|
|
|
|
| 126 |
cleaned_text = re.sub(r"\[Source:.*?\]", "", cleaned_text) # Remove source markers from final output
|
| 127 |
return cleaned_text.strip()
|
| 128 |
|
| 129 |
+
# Enhanced function with ARQl for resume generation
|
| 130 |
def generate_resume_with_aqr(job_scope, resume_text, temperature):
|
| 131 |
# Initialize Chat Model with lower temperature for more factual output
|
| 132 |
chat_model = ChatGroq(
|
|
|
|
| 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
|