Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from transformers import pipeline
|
3 |
+
|
4 |
+
# Load the summarization pipeline from Hugging Face
|
5 |
+
rephrase_pipeline = pipeline("text2text-generation", model="Vamsi/T5_Paraphrase_Paws")
|
6 |
+
|
7 |
+
def tailor_resume(job_description, resume):
|
8 |
+
prompt = f"Job Description: {job_description}\nResume: {resume}\n\nRewrite the resume to match the job description:"
|
9 |
+
output = rephrase_pipeline(prompt, max_length=512, do_sample=True, top_k=50)[0]["generated_text"]
|
10 |
+
return output
|
11 |
+
|
12 |
+
st.set_page_config(page_title="Resume Tailor", layout="centered")
|
13 |
+
|
14 |
+
st.title("π― Resume Tailoring App")
|
15 |
+
st.write("Enhance your resume based on the job description using AI.")
|
16 |
+
|
17 |
+
job_desc = st.text_area("π Paste the Job Description here:", height=200)
|
18 |
+
resume_input = st.text_area("π§Ύ Paste Your Resume here:", height=300)
|
19 |
+
|
20 |
+
if st.button("Tailor Resume"):
|
21 |
+
if job_desc.strip() == "" or resume_input.strip() == "":
|
22 |
+
st.warning("Please enter both the job description and your resume.")
|
23 |
+
else:
|
24 |
+
with st.spinner("Tailoring your resume..."):
|
25 |
+
tailored_resume = tailor_resume(job_desc, resume_input)
|
26 |
+
st.subheader("π Tailored Resume")
|
27 |
+
st.text_area("You can now copy your optimized resume below:", value=tailored_resume, height=400)
|