Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,30 +1,30 @@
|
|
| 1 |
-
import gradio as gr
|
| 2 |
-
from main import resume_parser, get_filtered_rows
|
| 3 |
-
|
| 4 |
-
with gr.Blocks() as demo:
|
| 5 |
-
with gr.Tabs():
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
parse_btn = gr.Button("Parse")
|
| 13 |
-
output_json = gr.Code(label="Parsed JSON", language="json")
|
| 14 |
-
|
| 15 |
-
parse_btn.click(fn=resume_parser, inputs=[file_input
|
| 16 |
-
|
| 17 |
-
# Tab 2: Text to DataFrame
|
| 18 |
-
with gr.Tab("Resume Filter"):
|
| 19 |
-
gr.Markdown("### 🔍 Resume Filter by Experience and Skills")
|
| 20 |
-
with gr.Row():
|
| 21 |
-
exp_input = gr.Number(label="Minimum Experience (Years)")
|
| 22 |
-
skills_input = gr.Textbox(label="Required Skills (comma-separated)", placeholder="e.g. Python, SQL, AWS")
|
| 23 |
-
|
| 24 |
-
submit_btn = gr.Button("Filter Resumes")
|
| 25 |
-
output = gr.Dataframe(label="Matching Candidates")
|
| 26 |
-
|
| 27 |
-
submit_btn.click(fn=get_filtered_rows, inputs=[exp_input, skills_input], outputs=output)
|
| 28 |
-
|
| 29 |
-
if __name__ == "__main__":
|
| 30 |
demo.launch(inbrowser=True)
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from main import resume_parser, get_filtered_rows
|
| 3 |
+
|
| 4 |
+
with gr.Blocks() as demo:
|
| 5 |
+
with gr.Tabs():
|
| 6 |
+
|
| 7 |
+
# Tab 1: File / Folder Upload
|
| 8 |
+
with gr.Tab("Resume Parser"):
|
| 9 |
+
gr.Markdown("### 📂 Upload Resume or Folder")
|
| 10 |
+
with gr.Row():
|
| 11 |
+
file_input = gr.File(label="Upload Resume (PDF, DOCX, ZIP)")
|
| 12 |
+
parse_btn = gr.Button("Parse")
|
| 13 |
+
output_json = gr.Code(label="Parsed JSON", language="json")
|
| 14 |
+
|
| 15 |
+
parse_btn.click(fn=resume_parser, inputs=[file_input], outputs=output_json)
|
| 16 |
+
|
| 17 |
+
# Tab 2: Text to DataFrame
|
| 18 |
+
with gr.Tab("Resume Filter"):
|
| 19 |
+
gr.Markdown("### 🔍 Resume Filter by Experience and Skills")
|
| 20 |
+
with gr.Row():
|
| 21 |
+
exp_input = gr.Number(label="Minimum Experience (Years)")
|
| 22 |
+
skills_input = gr.Textbox(label="Required Skills (comma-separated)", placeholder="e.g. Python, SQL, AWS")
|
| 23 |
+
|
| 24 |
+
submit_btn = gr.Button("Filter Resumes")
|
| 25 |
+
output = gr.Dataframe(label="Matching Candidates")
|
| 26 |
+
|
| 27 |
+
submit_btn.click(fn=get_filtered_rows, inputs=[exp_input, skills_input], outputs=output)
|
| 28 |
+
|
| 29 |
+
if __name__ == "__main__":
|
| 30 |
demo.launch(inbrowser=True)
|