Spaces:
Sleeping
Sleeping
Update styling, remove duplicate css
Browse files
app.py
CHANGED
@@ -25,109 +25,58 @@ st.markdown("""
|
|
25 |
text-align: center;
|
26 |
}
|
27 |
.stButton>button {
|
28 |
-
background-color: #4B7BE5;
|
29 |
-
color: white;
|
30 |
-
font-size: 18px;
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
uploaded_job_description = st.file_uploader("Upload Job Description (.docx or .pdf)", type=["docx", "pdf"], key="job_description")
|
49 |
-
|
50 |
-
# Process if files are uploaded
|
51 |
-
if uploaded_resume and uploaded_job_description:
|
52 |
-
# Save files
|
53 |
-
resume_path = save_uploaded_file(uploaded_resume)
|
54 |
-
job_description_path = save_uploaded_file(uploaded_job_description)
|
55 |
-
|
56 |
-
# Similarity Score Section
|
57 |
-
st.markdown("---")
|
58 |
-
st.subheader("Check Resume Similarity")
|
59 |
-
|
60 |
-
if st.btn("Check Similarity Score"):
|
61 |
-
similarity_score = similarity_main(resume_path, job_description_path)
|
62 |
-
if isinstance(similarity_score, str) and '%' in similarity_score:
|
63 |
-
similarity_score = float(similarity_score.replace('%', ''))
|
64 |
-
# Custom CSS for styling
|
65 |
-
st.markdown("""
|
66 |
-
<style>
|
67 |
-
.main {
|
68 |
-
background-color: #f5f5f5;
|
69 |
-
font-family: Arial, sans-serif;
|
70 |
-
}
|
71 |
-
h1, h2 {
|
72 |
-
color: #4B7BE5;
|
73 |
text-align: center;
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
|
|
79 |
}
|
80 |
.stButton>button:hover {
|
81 |
-
background-color: #3A6FD8;
|
82 |
-
color: white;
|
|
|
|
|
|
|
|
|
|
|
83 |
}
|
84 |
-
|
85 |
/* From Uiverse.io by e-coders */
|
86 |
-
|
87 |
-
|
88 |
-
background-color: transparent;
|
89 |
-
border: 0.125em solid #1A1A1A;
|
90 |
-
border-radius: 0.9375em;
|
91 |
-
box-sizing: border-box;
|
92 |
-
color: #3B3B3B;
|
93 |
-
cursor: pointer;
|
94 |
-
display: inline-block;
|
95 |
-
font-family: Roobert,-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
|
96 |
-
font-size: 16px;
|
97 |
-
font-weight: 600;
|
98 |
-
line-height: normal;
|
99 |
-
margin: 0;
|
100 |
-
min-height: 3.75em;
|
101 |
-
min-width: 0;
|
102 |
-
outline: none;
|
103 |
-
padding: 1em 2.3em;
|
104 |
-
text-align: center;
|
105 |
-
text-decoration: none;
|
106 |
-
transition: all 300ms cubic-bezier(.23, 1, 0.32, 1);
|
107 |
-
user-select: none;
|
108 |
-
-webkit-user-select: none;
|
109 |
-
touch-action: manipulation;
|
110 |
-
will-change: transform;
|
111 |
-
}
|
112 |
-
|
113 |
-
btn:disabled {
|
114 |
pointer-events: none;
|
115 |
}
|
|
|
116 |
|
117 |
-
|
118 |
-
color: #fff;
|
119 |
-
background-color: #1A1A1A;
|
120 |
-
box-shadow: rgba(0, 0, 0, 0.25) 0 8px 15px;
|
121 |
-
transform: translateY(-2px);
|
122 |
-
}
|
123 |
-
|
124 |
-
btn:active {
|
125 |
box-shadow: none;
|
126 |
transform: translateY(0);
|
127 |
}
|
128 |
</style>
|
129 |
""", unsafe_allow_html=True)
|
130 |
|
|
|
131 |
# Title and Description
|
132 |
st.title("Resume Tailoring with Google Generative AI")
|
133 |
st.markdown("### Upload your resume and job description to check similarity and generate a tailored resume.")
|
|
|
25 |
text-align: center;
|
26 |
}
|
27 |
.stButton>button {
|
28 |
+
# background-color: #4B7BE5;
|
29 |
+
# color: white;
|
30 |
+
# font-size: 18px;
|
31 |
+
appearance: none;
|
32 |
+
background-color: transparent;
|
33 |
+
border: 0.125em solid #1A1A1A;
|
34 |
+
border-radius: 0.9375em;
|
35 |
+
box-sizing: border-box;
|
36 |
+
color: #3B3B3B;
|
37 |
+
cursor: pointer;
|
38 |
+
display: inline-block;
|
39 |
+
font-family: Roobert,-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
|
40 |
+
font-size: 16px;
|
41 |
+
font-weight: 600;
|
42 |
+
line-height: normal;
|
43 |
+
margin: 0;
|
44 |
+
min-height: 3.75em;
|
45 |
+
min-width: 0;
|
46 |
+
outline: none;
|
47 |
+
padding: 1em 2.3em;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
text-align: center;
|
49 |
+
text-decoration: none;
|
50 |
+
transition: all 300ms cubic-bezier(.23, 1, 0.32, 1);
|
51 |
+
user-select: none;
|
52 |
+
-webkit-user-select: none;
|
53 |
+
touch-action: manipulation;
|
54 |
+
will-change: transform;
|
55 |
}
|
56 |
.stButton>button:hover {
|
57 |
+
# background-color: #3A6FD8;
|
58 |
+
# color: white;
|
59 |
+
color: #fff;
|
60 |
+
background-color: #1A1A1A;
|
61 |
+
box-shadow: rgba(0, 0, 0, 0.25) 0 8px 15px;
|
62 |
+
transform: translateY(-2px);
|
63 |
+
|
64 |
}
|
|
|
65 |
/* From Uiverse.io by e-coders */
|
66 |
+
|
67 |
+
.stButton>btn:disabled {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
pointer-events: none;
|
69 |
}
|
70 |
+
|
71 |
|
72 |
+
.stButton>:active {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
box-shadow: none;
|
74 |
transform: translateY(0);
|
75 |
}
|
76 |
</style>
|
77 |
""", unsafe_allow_html=True)
|
78 |
|
79 |
+
|
80 |
# Title and Description
|
81 |
st.title("Resume Tailoring with Google Generative AI")
|
82 |
st.markdown("### Upload your resume and job description to check similarity and generate a tailored resume.")
|