|
|
|
|
|
|
|
import streamlit as st |
|
|
|
|
|
from resume_maker_ai_agent.services.app_service import run |
|
from streamlit.runtime.uploaded_file_manager import UploadedFile |
|
|
|
|
|
def main() -> None: |
|
st.set_page_config(page_title="Resume Maker AI", page_icon="π") |
|
|
|
st.title("Resume Maker AI") |
|
st.write("Customize your resume for specific job descriptions using AI") |
|
|
|
|
|
uploaded_file: (UploadedFile | None) = st.file_uploader( |
|
"Upload your resume (PDF)", type="pdf") |
|
|
|
if uploaded_file is not None: |
|
print("File uploaded successfully!") |
|
print(f'File name: {uploaded_file.name}') |
|
print(f'File type: {uploaded_file.type}') |
|
print(f'File size: {uploaded_file.size}') |
|
|
|
|
|
job_description = st.text_area("Enter the job description:", height=200) |
|
|
|
if st.button("Customize Resume") and uploaded_file is not None and job_description: |
|
with st.spinner("Customizing your resume..."): |
|
try: |
|
|
|
customized_resume = run(uploaded_file, job_description) |
|
|
|
|
|
st.subheader("Customized Resume") |
|
st.write(customized_resume) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
except Exception as e: |
|
st.error(f"An error occurred: {e!s}") |
|
|
|
|
|
with st.expander("How to use"): |
|
st.write(""" |
|
1. Upload your current resume in PDF format |
|
2. Paste the job description you're targeting |
|
3. Click 'Customize Resume' to generate a tailored version |
|
4. Review the customized resume |
|
5. Download the result as a Word document |
|
""") |
|
|
|
|
|
st.markdown("---") |
|
st.markdown("Built with Streamlit and Crew AI") |
|
|
|
|
|
if __name__ == "__main__": |
|
main() |
|
|