Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -73,6 +73,23 @@ def format_resume_to_yaml(api_key, file_content, filter_option="full"):
|
|
73 |
return res
|
74 |
|
75 |
def main():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
input_api_key = Textbox(label="Enter your OpenAI API Key")
|
77 |
input_pdf_file = File(label="Upload your PDF resume", type="binary")
|
78 |
filter_options = Dropdown(label="Filter", choices=["full", "name"] + list(sections.keys()))
|
|
|
73 |
return res
|
74 |
|
75 |
def main():
|
76 |
+
# Define sections before using it for filter_options
|
77 |
+
sections = {
|
78 |
+
"full": "Complete template",
|
79 |
+
"name": "Only the name section",
|
80 |
+
"phoneNumbers": "Only the phone numbers section",
|
81 |
+
"websites": "Only the websites section",
|
82 |
+
"emails": "Only the emails section",
|
83 |
+
"dateOfBirth": "Only the date of birth section",
|
84 |
+
"addresses": "Only the addresses section",
|
85 |
+
"summary": "Only the summary section",
|
86 |
+
"education": "Only the education section",
|
87 |
+
"workExperience": "Only the work experience section",
|
88 |
+
"skills": "Only the skills section",
|
89 |
+
"certifications": "Only the certifications section",
|
90 |
+
# Add more sections as needed
|
91 |
+
}
|
92 |
+
|
93 |
input_api_key = Textbox(label="Enter your OpenAI API Key")
|
94 |
input_pdf_file = File(label="Upload your PDF resume", type="binary")
|
95 |
filter_options = Dropdown(label="Filter", choices=["full", "name"] + list(sections.keys()))
|