gperdrizet commited on
Commit
00268c0
·
verified ·
1 Parent(s): 6d69b0b

Removed extra user instructions input

Browse files
Files changed (2) hide show
  1. functions/gradio.py +3 -17
  2. resumate.py +7 -15
functions/gradio.py CHANGED
@@ -38,7 +38,6 @@ def process_inputs(
38
  linkedin_pdf_path: str = None,
39
  github_username: str = None,
40
  job_post_text: str = None,
41
- user_instructions: str = None
42
  ):
43
  """
44
  Process the input files and URLs from the Gradio interface.
@@ -47,7 +46,6 @@ def process_inputs(
47
  linkedin_pdf: (str) Path to uploaded LinkedIn resume export PDF file
48
  github_username (str): GitHub profile URL
49
  job_post_text (str): Job post text content
50
- user_instructions (str): Additional instructions from the user
51
 
52
  Returns:
53
  str: Formatted output with file and URL information
@@ -57,7 +55,6 @@ def process_inputs(
57
  logger.info("LinkedIn PDF: %s", linkedin_pdf_path)
58
  logger.info("GitHub username: %s", github_username)
59
  logger.info("Job post: %s", clean_text_whitespace(job_post_text[:100]).replace("\n", " "))
60
- logger.info("User instructions: %s", user_instructions[:100] if user_instructions else "None")
61
 
62
  # ==================================================================== #
63
  # Extract and structure text from the linkedin profile PDF
@@ -96,22 +93,10 @@ def process_inputs(
96
  else:
97
  logger.error("Job post parsing failed")
98
 
99
- # # ==================================================================== #
100
- # # Process user instructions
101
- # if user_instructions and user_instructions.strip():
102
- # result += "✅ Additional instructions provided\n"
103
- # logger.info("User instructions provided (%d characters)", len(user_instructions))
104
-
105
- # else:
106
- # result += "ℹ️ No additional instructions provided\n"
107
- # logger.info("No additional instructions provided")
108
-
109
- # logger.info("Input processing completed")
110
-
111
  # ==================================================================== #
112
  # Generate resume only if we have valid extraction results
113
- result = None
114
-
115
  if linkedin_resume and github_repositories and job_post:
116
  logger.info("Generating resume with provided data")
117
 
@@ -120,6 +105,7 @@ def process_inputs(
120
 
121
  except Exception as e:
122
  logger.error("Resume generation failed: %s", str(e))
 
123
  else:
124
  logger.warning("Resume generation skipped - content missing")
125
 
 
38
  linkedin_pdf_path: str = None,
39
  github_username: str = None,
40
  job_post_text: str = None,
 
41
  ):
42
  """
43
  Process the input files and URLs from the Gradio interface.
 
46
  linkedin_pdf: (str) Path to uploaded LinkedIn resume export PDF file
47
  github_username (str): GitHub profile URL
48
  job_post_text (str): Job post text content
 
49
 
50
  Returns:
51
  str: Formatted output with file and URL information
 
55
  logger.info("LinkedIn PDF: %s", linkedin_pdf_path)
56
  logger.info("GitHub username: %s", github_username)
57
  logger.info("Job post: %s", clean_text_whitespace(job_post_text[:100]).replace("\n", " "))
 
58
 
59
  # ==================================================================== #
60
  # Extract and structure text from the linkedin profile PDF
 
93
  else:
94
  logger.error("Job post parsing failed")
95
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  # ==================================================================== #
97
  # Generate resume only if we have valid extraction results
98
+ result = ""
99
+
100
  if linkedin_resume and github_repositories and job_post:
101
  logger.info("Generating resume with provided data")
102
 
 
105
 
106
  except Exception as e:
107
  logger.error("Resume generation failed: %s", str(e))
108
+ result = ""
109
  else:
110
  logger.warning("Resume generation skipped - content missing")
111
 
resumate.py CHANGED
@@ -16,6 +16,7 @@ To run:
16
  import gradio as gr
17
  from functions.gradio import process_inputs
18
 
 
19
  with gr.Blocks() as demo:
20
  gr.Markdown("# Resumate: tailored resume generator")
21
 
@@ -62,27 +63,18 @@ with gr.Blocks() as demo:
62
 
63
  job_post = gr.Textbox(
64
  label="Job Post",
65
- placeholder="Copy and paste the job post text here"
66
- )
67
-
68
- gr.Markdown("""
69
- ## 4. Additional instructions (optional)
70
-
71
- 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.
72
- """)
73
-
74
- user_instructions = gr.Textbox(
75
- label="Additional Instructions",
76
- placeholder="Enter any additional instructions for the resume writer (optional)",
77
- lines=3
78
  )
79
 
80
  submit_btn = gr.Button("Submit")
81
- output = gr.Textbox(label="Output", lines=5, show_copy_button=True)
 
82
 
83
  submit_btn.click( # pylint: disable=no-member
84
  process_inputs,
85
- inputs=[linkedin_pdf, github_profile, job_post, user_instructions],
86
  outputs=output
87
  )
88
 
 
16
  import gradio as gr
17
  from functions.gradio import process_inputs
18
 
19
+
20
  with gr.Blocks() as demo:
21
  gr.Markdown("# Resumate: tailored resume generator")
22
 
 
63
 
64
  job_post = gr.Textbox(
65
  label="Job Post",
66
+ placeholder="Copy and paste the job post text here",
67
+ lines=1,
68
+ max_lines=5
 
 
 
 
 
 
 
 
 
 
69
  )
70
 
71
  submit_btn = gr.Button("Submit")
72
+
73
+ output = gr.Markdown(label="Generated Resume")
74
 
75
  submit_btn.click( # pylint: disable=no-member
76
  process_inputs,
77
+ inputs=[linkedin_pdf, github_profile, job_post],
78
  outputs=output
79
  )
80