Spaces:
Sleeping
Sleeping
File size: 1,236 Bytes
3c5eda4 cb5cfea | 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 | import gradio as gr
from main import resume_parser, get_filtered_rows
with gr.Blocks() as demo:
with gr.Tabs():
# Tab 1: File / Folder Upload
with gr.Tab("Resume Parser"):
gr.Markdown("### 📂 Upload Resume or Folder")
with gr.Row():
file_input = gr.File(label="Upload Resume (PDF, DOCX, ZIP)")
parse_btn = gr.Button("Parse")
output_json = gr.Code(label="Parsed JSON", language="json")
parse_btn.click(fn=resume_parser, inputs=[file_input], outputs=output_json)
# Tab 2: Text to DataFrame
with gr.Tab("Resume Filter"):
gr.Markdown("### 🔍 Resume Filter by Experience and Skills")
with gr.Row():
exp_input = gr.Number(label="Minimum Experience (Years)")
skills_input = gr.Textbox(label="Required Skills (comma-separated)", placeholder="e.g. Python, SQL, AWS")
submit_btn = gr.Button("Filter Resumes")
output = gr.Dataframe(label="Matching Candidates")
submit_btn.click(fn=get_filtered_rows, inputs=[exp_input, skills_input], outputs=output)
if __name__ == "__main__":
demo.launch(inbrowser=True) |