datascientist22
commited on
Commit
β’
1386d9b
1
Parent(s):
8631f90
Update app.py
Browse files
app.py
CHANGED
@@ -42,9 +42,22 @@ with st.sidebar:
|
|
42 |
st.markdown("You can get your API key from [Cohere's website](https://dashboard.cohere.com/).")
|
43 |
api_key = st.text_input("Enter your Cohere API Key", type="password")
|
44 |
|
45 |
-
# Job description input
|
46 |
st.subheader("π Job Description")
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
|
49 |
# Check if user data is already in session state
|
50 |
if "name" not in st.session_state:
|
@@ -183,25 +196,18 @@ if "api_key" in st.session_state:
|
|
183 |
Company Name: {company_name}
|
184 |
Company Address: {company_address}
|
185 |
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
1. Applicant's contact details.
|
193 |
-
2. Date.
|
194 |
-
3. Employer's details.
|
195 |
-
4. Introduction.
|
196 |
-
5. Relevant skills and experiences.
|
197 |
-
6. Enthusiasm for the role.
|
198 |
-
7. Closing with a call to action.
|
199 |
"""
|
200 |
|
201 |
-
# Generate
|
202 |
cover_letter_output = chat_model.invoke(input=cover_letter_prompt)
|
203 |
|
204 |
-
# Display the
|
205 |
-
st.subheader("
|
206 |
-
st.text_area("Your Cover Letter", cover_letter_output.content, height=
|
207 |
st.button("π Copy Cover Letter to Clipboard")
|
|
|
42 |
st.markdown("You can get your API key from [Cohere's website](https://dashboard.cohere.com/).")
|
43 |
api_key = st.text_input("Enter your Cohere API Key", type="password")
|
44 |
|
45 |
+
# Job description input with enhanced style
|
46 |
st.subheader("π Job Description")
|
47 |
+
st.markdown("""
|
48 |
+
<style>
|
49 |
+
.job-description-textarea {
|
50 |
+
background-color: #f7f7f7;
|
51 |
+
border: 2px solid #ff6f61;
|
52 |
+
border-radius: 8px;
|
53 |
+
padding: 10px;
|
54 |
+
font-weight: bold;
|
55 |
+
font-size: 16px;
|
56 |
+
color: #333;
|
57 |
+
}
|
58 |
+
</style>
|
59 |
+
""", unsafe_allow_html=True)
|
60 |
+
job_description = st.text_area("Paste the Job Description here", placeholder="Enter the job description you're applying for...", height=200, key="job_description", help="Provide the job description for matching with your resume.")
|
61 |
|
62 |
# Check if user data is already in session state
|
63 |
if "name" not in st.session_state:
|
|
|
196 |
Company Name: {company_name}
|
197 |
Company Address: {company_address}
|
198 |
|
199 |
+
Cover Letter:
|
200 |
+
- Begin with a greeting.
|
201 |
+
- Mention the position you're applying for.
|
202 |
+
- Explain why you're a good fit for the role.
|
203 |
+
- Include any relevant experiences or skills.
|
204 |
+
- End with a polite closing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
"""
|
206 |
|
207 |
+
# Generate cover letter
|
208 |
cover_letter_output = chat_model.invoke(input=cover_letter_prompt)
|
209 |
|
210 |
+
# Display the cover letter and a copy button
|
211 |
+
st.subheader("π© Generated Cover Letter")
|
212 |
+
st.text_area("Your Cover Letter", cover_letter_output.content, height=400)
|
213 |
st.button("π Copy Cover Letter to Clipboard")
|