edouardlgp commited on
Commit
8e5c463
·
verified ·
1 Parent(s): ac17970

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +51 -7
app.py CHANGED
@@ -711,14 +711,48 @@ def process_pdf(file):
711
  with gr.Blocks() as demo:
712
  gr.Markdown("# Standardize Job Description!")
713
  gr.Markdown("Identify Job Family, Occupation, Qualification, match Skills and suggest interview questions.")
 
714
  with gr.Row():
715
  with gr.Column():
716
- file_input = gr.File(label="Upload a Post Description PDF file - not a scan!", file_types=[".pdf"])
717
  submit_btn = gr.Button("Analyse Post Description")
 
 
 
 
 
 
 
 
 
718
  with gr.Column():
719
- text_output = gr.Textbox(label="Extracted Text", lines=30, max_lines=50, interactive=False)
720
- if DEBUG:
721
- gr.Markdown("### Debug Console", elem_classes=["debug-title"])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
722
  debug_console = gr.Textbox(
723
  label="",
724
  interactive=False,
@@ -729,9 +763,19 @@ with gr.Blocks() as demo:
729
  submit_btn.click(
730
  fn=process_pdf,
731
  inputs=file_input,
732
- outputs=[text_output, debug_console] if DEBUG else [text_output],
 
 
 
 
 
 
 
 
 
 
 
733
  )
734
 
735
  if __name__ == "__main__":
736
- demo.launch(show_error=True,
737
- debug=DEBUG)
 
711
  with gr.Blocks() as demo:
712
  gr.Markdown("# Standardize Job Description!")
713
  gr.Markdown("Identify Job Family, Occupation, Qualification, match Skills and suggest interview questions.")
714
+
715
  with gr.Row():
716
  with gr.Column():
717
+ file_input = gr.File(label="Upload a Post Description PDF file", file_types=[".pdf"])
718
  submit_btn = gr.Button("Analyse Post Description")
719
+
720
+ with gr.Row():
721
+ with gr.Column():
722
+ file_name_output = gr.Textbox(label="File Name", interactive=False)
723
+ responsibilities_output = gr.Textbox(label="Responsibilities", lines=5, interactive=False)
724
+ job_family_output = gr.Textbox(label="Classified Job Family", interactive=False)
725
+ qualification_output = gr.Textbox(label="Qualification", lines=5, interactive=False)
726
+
727
+ with gr.Row():
728
  with gr.Column():
729
+ gr.Markdown("## CCOG Levels")
730
+ ccoq_levels_output = gr.JSON(label="CCOG Levels", interactive=False)
731
+
732
+ with gr.Row():
733
+ with gr.Column():
734
+ gr.Markdown("## Interview Questions")
735
+ interview_output = gr.Textbox(label="Interview Questions", lines=10, interactive=False)
736
+
737
+ with gr.Row():
738
+ with gr.Column():
739
+ gr.Markdown("## Skills")
740
+ skills_output = gr.JSON(label="Skills", interactive=False)
741
+
742
+ with gr.Row():
743
+ with gr.Column():
744
+ gr.Markdown("## ESCO Levels")
745
+ esco_levels_output = gr.JSON(label="ESCO Levels", interactive=False)
746
+
747
+ with gr.Row():
748
+ with gr.Column():
749
+ gr.Markdown("## ESCO Skills")
750
+ esco_skills_output = gr.JSON(label="ESCO Skills", interactive=False)
751
+
752
+ if DEBUG:
753
+ with gr.Row():
754
+ with gr.Column():
755
+ gr.Markdown("### Debug Console")
756
  debug_console = gr.Textbox(
757
  label="",
758
  interactive=False,
 
763
  submit_btn.click(
764
  fn=process_pdf,
765
  inputs=file_input,
766
+ outputs=[
767
+ file_name_output,
768
+ responsibilities_output,
769
+ job_family_output,
770
+ qualification_output,
771
+ ccoq_levels_output,
772
+ interview_output,
773
+ skills_output,
774
+ esco_levels_output,
775
+ esco_skills_output,
776
+ debug_console if DEBUG else None
777
+ ]
778
  )
779
 
780
  if __name__ == "__main__":
781
+ demo.launch(show_error=True, debug=DEBUG)