Spaces:
Configuration error
Configuration error
| """ | |
| resumate.py | |
| A simple Gradio UI for collecting user profile and job post information. | |
| This app provides inputs for: | |
| - LinkedIn resume export PDF file upload | |
| - GitHub profile URL | |
| - LinkedIn job post text | |
| Upon submission, the input values are processed and displayed in the output box. | |
| To run: | |
| python resumate.py | |
| """ | |
| from pathlib import Path | |
| import gradio as gr | |
| from functions.gradio import check_default_linkedin_pdf, process_with_default_option | |
| # Check if default PDF exists at startup | |
| has_default, default_path = check_default_linkedin_pdf() | |
| with gr.Blocks() as demo: | |
| gr.Markdown("# Resumate: tailored resume generator") | |
| gr.Markdown(""" | |
| ## 1. Biographical details | |
| Upload your LinkedIn profile export as a PDF file to provide experience and education details. | |
| ### How to Export Your LinkedIn Profile as PDF | |
| 1. **Go to your LinkedIn profile page** (linkedin.com/in/your-profile) | |
| 2. **Click "More" button** (three dots) in your profile header section | |
| 3. **Select "Save to PDF"** from the dropdown menu | |
| 4. **Wait for the download** - LinkedIn will generate and download your profile as a PDF file | |
| 5. **Upload the downloaded PDF** using the file upload box below | |
| **Tip**: Make sure your LinkedIn profile is complete and up-to-date before exporting for best results! | |
| """) | |
| # Default PDF option | |
| if has_default: | |
| use_default_pdf = gr.Checkbox( | |
| label=f"Use default LinkedIn PDF ({Path(default_path).name})", | |
| value=False, | |
| info="Use the default LinkedIn PDF stored in the data directory" | |
| ) | |
| else: | |
| use_default_pdf = gr.Checkbox( | |
| label="Use default LinkedIn PDF (not available)", | |
| value=False, | |
| interactive=False, | |
| info="No default LinkedIn PDF found in data directory" | |
| ) | |
| linkedin_pdf = gr.File( | |
| label="LinkedIn Resume Export PDF", | |
| file_types=[".pdf"], | |
| file_count="single" | |
| ) | |
| gr.Markdown(""" | |
| ## 2. Project portfolio | |
| Provide your GitHub profile URL, resumate will select and add the projects most relevant to the job post. Only public repositories will be considered. | |
| **Tip**: Make sure your GitHub profile is complete and up-to-date before using resumate! | |
| """) | |
| github_profile = gr.Textbox( | |
| label="GitHub Profile URL", | |
| placeholder="Enter your GitHub profile URL" | |
| ) | |
| gr.Markdown(""" | |
| ## 3. The job post | |
| Provide the full text of the job post you are applying for, resumate will tailor your resume to match the job description. | |
| """) | |
| job_post = gr.Textbox( | |
| label="Job Post", | |
| placeholder="Copy and paste the job post text here" | |
| ) | |
| gr.Markdown(""" | |
| ## 4. Additional instructions (optional) | |
| Provide any additional instructions or adjustments for the resume writer agent. This could include specific formatting preferences, emphasis on certain skills, or any other customizations you'd like. | |
| """) | |
| user_instructions = gr.Textbox( | |
| label="Additional Instructions", | |
| placeholder="Enter any additional instructions for the resume writer (optional)", | |
| lines=3 | |
| ) | |
| submit_btn = gr.Button("Submit") | |
| output = gr.Textbox(label="Output", lines=5, max_lines=50, show_copy_button=True) | |
| submit_btn.click( # pylint: disable=no-member | |
| process_with_default_option, | |
| inputs=[use_default_pdf, linkedin_pdf, github_profile, job_post, user_instructions], | |
| outputs=output | |
| ) | |
| demo.launch() | |