Spaces:
Sleeping
Sleeping
TejaCherukuri
commited on
Commit
ยท
b3bba2b
1
Parent(s):
d8b1d79
changes to ui
Browse files
app.py
CHANGED
|
@@ -7,43 +7,96 @@ def main():
|
|
| 7 |
# Set the page layout to wide mode
|
| 8 |
st.set_page_config(page_title="ProSpectAI: The Smart Way to Reach Out to Recruiters", layout="wide")
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
# Title of the app
|
| 11 |
st.title("ProSpectAI: The Smart Way to Reach Out to Recruiters")
|
| 12 |
-
st.markdown("Tailored job application messages at the click of a button.")
|
| 13 |
-
|
| 14 |
-
# Add GitHub repository link
|
| 15 |
-
st.markdown("[๐ View on GitHub](https://github.com/tejacherukuri/ProSpectAI)")
|
| 16 |
|
| 17 |
# Resume Upload Section
|
| 18 |
-
st.subheader("Upload Your Resume")
|
| 19 |
uploaded_file = st.file_uploader("Upload a PDF Resume", type=["pdf"])
|
| 20 |
|
| 21 |
-
# Job Input Option (Radio Buttons for Job URL or Description)
|
| 22 |
-
input_option = st.radio(
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
-
|
| 28 |
-
|
| 29 |
|
| 30 |
-
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
job_url = st.text_input(
|
| 33 |
"Enter the Job URL",
|
| 34 |
placeholder="https://amazon.jobs/en/jobs/2831138/software-development-engineer-2025-ai-ml"
|
| 35 |
)
|
| 36 |
|
| 37 |
-
#
|
| 38 |
-
with st.expander("
|
| 39 |
-
st.markdown(
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
|
| 48 |
# Button to trigger the flow
|
| 49 |
if st.button("Generate Message"):
|
|
|
|
| 7 |
# Set the page layout to wide mode
|
| 8 |
st.set_page_config(page_title="ProSpectAI: The Smart Way to Reach Out to Recruiters", layout="wide")
|
| 9 |
|
| 10 |
+
# # Unified CSS for styling both file uploader and radio button labels
|
| 11 |
+
# st.markdown(
|
| 12 |
+
# """
|
| 13 |
+
# <style>
|
| 14 |
+
# /* Increase font size, make bold, and change color for labels */
|
| 15 |
+
# div[data-testid="stFileUploader"] label,
|
| 16 |
+
# div[data-testid="stRadio"] label {
|
| 17 |
+
# font-size: 20px !important;
|
| 18 |
+
# font-weight: bold !important;
|
| 19 |
+
# color: #1E90FF !important; /* DodgerBlue */
|
| 20 |
+
# }
|
| 21 |
+
# </style>
|
| 22 |
+
# """,
|
| 23 |
+
# unsafe_allow_html=True
|
| 24 |
+
# )
|
| 25 |
+
|
| 26 |
+
# Custom CSS to reduce the subheader size
|
| 27 |
+
st.markdown(
|
| 28 |
+
"""
|
| 29 |
+
<style>
|
| 30 |
+
/* Reduce font size for subheaders */
|
| 31 |
+
div[data-testid="stMarkdownContainer"] h3 {
|
| 32 |
+
font-size: 25px !important; /* Adjust size as needed */
|
| 33 |
+
font-weight: bold !important;
|
| 34 |
+
}
|
| 35 |
+
</style>
|
| 36 |
+
""",
|
| 37 |
+
unsafe_allow_html=True
|
| 38 |
+
)
|
| 39 |
+
|
| 40 |
# Title of the app
|
| 41 |
st.title("ProSpectAI: The Smart Way to Reach Out to Recruiters")
|
| 42 |
+
st.markdown("Tailored job application messages at the click of a button. [[GitHub]](https://github.com/tejacherukuri/ProSpectAI)")
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
# Resume Upload Section
|
| 45 |
+
st.subheader("Upload Your Resume & Job Information")
|
| 46 |
uploaded_file = st.file_uploader("Upload a PDF Resume", type=["pdf"])
|
| 47 |
|
| 48 |
+
# # Job Input Option (Radio Buttons for Job URL or Description)
|
| 49 |
+
# input_option = st.radio(
|
| 50 |
+
# "How would you like to provide the job information?",
|
| 51 |
+
# ("Job URL", "Job Description")
|
| 52 |
+
# )
|
| 53 |
+
|
| 54 |
+
# job_url = None
|
| 55 |
+
# job_description = None
|
| 56 |
+
|
| 57 |
+
# # Show corresponding input field based on the selection
|
| 58 |
+
# if input_option == "Job URL":
|
| 59 |
+
# job_url = st.text_input(
|
| 60 |
+
# "Enter the Job URL",
|
| 61 |
+
# placeholder="https://amazon.jobs/en/jobs/2831138/software-development-engineer-2025-ai-ml"
|
| 62 |
+
# )
|
| 63 |
+
|
| 64 |
+
# # Display the alert with color
|
| 65 |
+
# with st.expander("๐ **Alert!** Job URL Instructions", expanded=True):
|
| 66 |
+
# st.markdown(
|
| 67 |
+
# """
|
| 68 |
+
# <p style="color:red;">If using a LinkedIn job URL (Easy Apply), paste the job description instead.</p>
|
| 69 |
+
# """, unsafe_allow_html=True)
|
| 70 |
+
|
| 71 |
+
# elif input_option == "Job Description":
|
| 72 |
+
# job_description = st.text_area("Enter the Job Description", height=200)
|
| 73 |
|
| 74 |
+
# Job Input Option (Radio Buttons Side by Side)
|
| 75 |
+
col1, col2 = st.columns([1, 1]) # Equal width columns
|
| 76 |
|
| 77 |
+
with col1:
|
| 78 |
+
job_input_option = st.radio("How would you like to provide the job information?", ["Job URL", "Job Description"], horizontal=True)
|
| 79 |
+
|
| 80 |
+
job_description = None # Ensure job_description is None
|
| 81 |
+
job_url = None # Ensure job_url is None
|
| 82 |
+
|
| 83 |
+
# Dynamic Input Fields Based on Selection
|
| 84 |
+
if job_input_option == "Job URL":
|
| 85 |
job_url = st.text_input(
|
| 86 |
"Enter the Job URL",
|
| 87 |
placeholder="https://amazon.jobs/en/jobs/2831138/software-development-engineer-2025-ai-ml"
|
| 88 |
)
|
| 89 |
|
| 90 |
+
# Expander for LinkedIn job URL Note
|
| 91 |
+
with st.expander("โน๏ธ Important Note", expanded=True):
|
| 92 |
+
st.markdown('<span style="color: red;">If using a LinkedIn job URL (Easy Apply), paste the job description instead.</span>', unsafe_allow_html=True)
|
| 93 |
+
|
| 94 |
+
elif job_input_option == "Job Description":
|
| 95 |
+
job_description = st.text_area(
|
| 96 |
+
"Paste the Job Description",
|
| 97 |
+
placeholder="Copy and paste the job description here..."
|
| 98 |
+
)
|
| 99 |
+
|
| 100 |
|
| 101 |
# Button to trigger the flow
|
| 102 |
if st.button("Generate Message"):
|