Spaces:
Sleeping
Sleeping
Update download button to get resume_bytes
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ import pandas as pd
|
|
5 |
import matplotlib.pyplot as plt
|
6 |
from resume_generation_gemini_pro import Gemini_pro_main
|
7 |
from similarity_score_refined import similarity_main
|
|
|
8 |
|
9 |
# Helper function to save uploaded files temporarily and return their paths
|
10 |
def save_uploaded_file(uploaded_file):
|
@@ -135,9 +136,14 @@ if uploaded_resume and uploaded_job_description:
|
|
135 |
st.subheader("Generated Tailored Resume:")
|
136 |
st.write(generated_resume)
|
137 |
|
|
|
|
|
|
|
|
|
|
|
138 |
st.download_button(
|
139 |
label="Download Resume",
|
140 |
-
data=
|
141 |
file_name="tailored_resume.docx",
|
142 |
mime="application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
143 |
)
|
|
|
5 |
import matplotlib.pyplot as plt
|
6 |
from resume_generation_gemini_pro import Gemini_pro_main
|
7 |
from similarity_score_refined import similarity_main
|
8 |
+
from io import BytesIO
|
9 |
|
10 |
# Helper function to save uploaded files temporarily and return their paths
|
11 |
def save_uploaded_file(uploaded_file):
|
|
|
136 |
st.subheader("Generated Tailored Resume:")
|
137 |
st.write(generated_resume)
|
138 |
|
139 |
+
|
140 |
+
resume_bytes = BytesIO()
|
141 |
+
generated_resume.save(resume_bytes)
|
142 |
+
resume_bytes.seek(0)
|
143 |
+
|
144 |
st.download_button(
|
145 |
label="Download Resume",
|
146 |
+
data=resume_bytes,
|
147 |
file_name="tailored_resume.docx",
|
148 |
mime="application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
149 |
)
|