Update app.py
Browse files
app.py
CHANGED
|
@@ -79,7 +79,7 @@ def pred_resume(pdf_path) -> dict:
|
|
| 79 |
# read pdf, convert to img
|
| 80 |
doc = fitz.open(pdf_path.name)
|
| 81 |
num_pages = len(doc)
|
| 82 |
-
images = pdf2image.convert_from_path(pdf_path)
|
| 83 |
block_dict = {}
|
| 84 |
|
| 85 |
# get all data in pdf
|
|
@@ -156,11 +156,12 @@ with gr.Blocks() as demo:
|
|
| 156 |
text_output = gr.Textbox(label="Result:")
|
| 157 |
text_button = gr.Button("Predict")
|
| 158 |
with gr.Tab("Extract infomation from resume"):
|
| 159 |
-
with gr.
|
| 160 |
file_input = gr.File(label="Upload pdf", file_types=[".pdf"])
|
|
|
|
| 161 |
cv_output = gr.Textbox(label="Information fields")
|
| 162 |
resume_button = gr.Button("Extract")
|
| 163 |
-
with gr.
|
| 164 |
normalize_output = gr.Textbox(label="Normalize by rule-based:")
|
| 165 |
normalize_button = gr.Button("Normailze")
|
| 166 |
|
|
|
|
| 79 |
# read pdf, convert to img
|
| 80 |
doc = fitz.open(pdf_path.name)
|
| 81 |
num_pages = len(doc)
|
| 82 |
+
images = pdf2image.convert_from_path(pdf_path.name)
|
| 83 |
block_dict = {}
|
| 84 |
|
| 85 |
# get all data in pdf
|
|
|
|
| 156 |
text_output = gr.Textbox(label="Result:")
|
| 157 |
text_button = gr.Button("Predict")
|
| 158 |
with gr.Tab("Extract infomation from resume"):
|
| 159 |
+
with gr.Column():
|
| 160 |
file_input = gr.File(label="Upload pdf", file_types=[".pdf"])
|
| 161 |
+
with gr.Column():
|
| 162 |
cv_output = gr.Textbox(label="Information fields")
|
| 163 |
resume_button = gr.Button("Extract")
|
| 164 |
+
with gr.Column():
|
| 165 |
normalize_output = gr.Textbox(label="Normalize by rule-based:")
|
| 166 |
normalize_button = gr.Button("Normailze")
|
| 167 |
|