Spaces:
				
			
			
	
			
			
		Configuration error
		
	
	
	
			
			
	
	
	
	
		
		
		Configuration error
		
	File size: 2,139 Bytes
			
			| 67b1d67 f1fa456 67b1d67 f1fa456 67b1d67 f1fa456 df6f062 f1fa456 67b1d67 5ba8d84 67b1d67 5ba8d84 67b1d67 5ba8d84 67b1d67 5ba8d84 67b1d67 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | """
resumate.py
A simple Gradio UI for collecting user profile and job post URLs.
This app provides three text input fields for:
- LinkedIn profile URL
- GitHub profile URL
- LinkedIn job post URL
Upon submission, the input values are displayed in the output box.
To run:
    python resumate.py
"""
import gradio as gr
from functions.context_acquisition import get_linkedin_profile_html
def process_inputs(linkedin_url, github_url, job_post_url):
    """
    Process the input URLs and retrieve content from LinkedIn profile.
    
    Args:
        linkedin_url (str): LinkedIn profile URL
        github_url (str): GitHub profile URL  
        job_post_url (str): LinkedIn job post URL
    
    Returns:
        str: Formatted output with URL information and LinkedIn profile status
    """
    result = f"LinkedIn: {linkedin_url}\nGitHub: {github_url}\nJob Post: {job_post_url}\n\n"
    # Try to retrieve LinkedIn profile HTML if URL is provided
    if linkedin_url and linkedin_url.strip():
        try:
            result += "Attempting to retrieve LinkedIn profile...\n"
            html_content = get_linkedin_profile_html(linkedin_url)
            result += f"LinkedIn profile HTML ({len(html_content)} characters)\n"
        except Exception as e: # pylint: disable=broad-exception-caught
            result += f"❌ Failed to retrieve LinkedIn profile: {str(e)}\n"
    return result
with gr.Blocks() as demo:
    gr.Markdown("# Resumate: Profile & Job Post Input")
    linkedin_profile = gr.Textbox(
        label="LinkedIn Profile URL",
        placeholder="Enter your LinkedIn profile URL"
    )
    github_profile = gr.Textbox(
        label="GitHub Profile URL",
        placeholder="Enter your GitHub profile URL"
    )
    job_post = gr.Textbox(
        label="LinkedIn Job Post URL",
        placeholder="Enter the LinkedIn job post URL"
    )
    submit_btn = gr.Button("Submit")
    output = gr.Textbox(label="Output", lines=3)
    submit_btn.click( # pylint: disable=no-member
        process_inputs,
        inputs=[linkedin_profile, github_profile, job_post],
        outputs=output
    )
demo.launch()
 | 
