|
|
""" |
|
|
CV Upload UI for Job Applications. |
|
|
|
|
|
Connects to the CV Upload API. |
|
|
Run with: streamlit run src/frontend/streamlit/cv_ui/app.py |
|
|
|
|
|
In Docker, set CV_UPLOAD_API_URL environment variable. |
|
|
Locally, defaults to http://localhost:8080/api/v1/cv |
|
|
""" |
|
|
|
|
|
import streamlit as st |
|
|
from src.sdk import CVUploadClient |
|
|
|
|
|
|
|
|
client = CVUploadClient() |
|
|
|
|
|
st.set_page_config(page_title="AI Engineer Job Portal", page_icon="π€", layout="centered") |
|
|
|
|
|
|
|
|
st.title("π€ AI Engineer Job Application Portal") |
|
|
st.markdown( |
|
|
""" |
|
|
Welcome to **ScionHire AI Labs** π |
|
|
We're seeking talented engineers passionate about building intelligent systems! |
|
|
Please submit your CV below to apply for the **AI Engineer** position. |
|
|
""" |
|
|
) |
|
|
|
|
|
|
|
|
with st.expander("π View Job Description"): |
|
|
st.markdown( |
|
|
""" |
|
|
### π§ Position: AI Engineer |
|
|
**Location:** Remote / Wiesbaden HQ |
|
|
**About the Role:** |
|
|
Join our AI R&D team to develop, fine-tune, and deploy ML models for production. |
|
|
You will work on projects involving LLMs, LangGraph agents, and context engineering. |
|
|
|
|
|
**Requirements:** |
|
|
- Proficiency in Python & modern AI frameworks (PyTorch, LangChain, etc.) |
|
|
- Solid understanding of NLP and ML pipelines |
|
|
- Experience deploying models or building intelligent systems |
|
|
- Strong communication and teamwork skills |
|
|
""" |
|
|
) |
|
|
|
|
|
st.markdown("---") |
|
|
|
|
|
|
|
|
with st.form("application_form"): |
|
|
full_name = st.text_input("Full Name", placeholder="Ada Lovelace") |
|
|
email = st.text_input("Email Address", placeholder="ada@lovelabs.ai") |
|
|
phone = st.text_input("Phone Number", placeholder="+49 170 1234567") |
|
|
uploaded_file = st.file_uploader("Upload Your CV (PDF or DOCX)", type=["pdf", "docx"]) |
|
|
submitted = st.form_submit_button("π¨ Submit Application") |
|
|
|
|
|
|
|
|
if submitted: |
|
|
if not uploaded_file: |
|
|
st.error("Please upload your CV before submitting.") |
|
|
elif not (full_name and email): |
|
|
st.error("Full name and email are required.") |
|
|
else: |
|
|
try: |
|
|
with st.spinner("π€ Submitting your application..."): |
|
|
response = client.submit( |
|
|
full_name=full_name, |
|
|
email=email, |
|
|
phone=phone, |
|
|
cv_file=uploaded_file, |
|
|
filename=uploaded_file.name, |
|
|
) |
|
|
|
|
|
if response.success: |
|
|
st.success(f"β
{response.message}") |
|
|
st.info("Your application has been recorded. You will receive updates soon.") |
|
|
|
|
|
with st.expander("π¬ Submitted Info"): |
|
|
st.json({ |
|
|
"full_name": response.candidate_name, |
|
|
"email": response.email, |
|
|
"phone": phone, |
|
|
"cv_file_path": response.cv_file_path, |
|
|
"position": "AI Engineer", |
|
|
}) |
|
|
|
|
|
elif response.already_exists: |
|
|
st.warning( |
|
|
f"β οΈ {response.message} " |
|
|
"Please wait for review." |
|
|
) |
|
|
else: |
|
|
st.error(f"β {response.message}") |
|
|
|
|
|
except ValueError as e: |
|
|
st.error(f"β {str(e)}") |
|
|
except Exception as e: |
|
|
st.error(f"β Failed to submit application. Is the API running?\n\nError: {e}") |
|
|
|