Commit bdfdfea6 authored by myhloli's avatar myhloli
Browse files

feat: enable table recognition by default- Set table recognition to enabled by default in the UI

- Change default layout model to 'doclayout_yolo'- Enable table recognition in the magic-pdf template
parent a3de866d
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
}, },
"table-config": { "table-config": {
"model": "rapid_table", "model": "rapid_table",
"enable": false, "enable": true,
"max_time": 400 "max_time": 400
}, },
"llm-aided-config": { "llm-aided-config": {
......
...@@ -192,12 +192,12 @@ if __name__ == '__main__': ...@@ -192,12 +192,12 @@ if __name__ == '__main__':
file = gr.File(label='Please upload a PDF or image', file_types=['.pdf', '.png', '.jpeg', '.jpg']) file = gr.File(label='Please upload a PDF or image', file_types=['.pdf', '.png', '.jpeg', '.jpg'])
max_pages = gr.Slider(1, 20, 10, step=1, label='Max convert pages') max_pages = gr.Slider(1, 20, 10, step=1, label='Max convert pages')
with gr.Row(): with gr.Row():
layout_mode = gr.Dropdown(['layoutlmv3', 'doclayout_yolo'], label='Layout model', value='layoutlmv3') layout_mode = gr.Dropdown(['layoutlmv3', 'doclayout_yolo'], label='Layout model', value='doclayout_yolo')
language = gr.Dropdown(all_lang, label='Language', value='') language = gr.Dropdown(all_lang, label='Language', value='')
with gr.Row(): with gr.Row():
formula_enable = gr.Checkbox(label='Enable formula recognition', value=True) formula_enable = gr.Checkbox(label='Enable formula recognition', value=True)
is_ocr = gr.Checkbox(label='Force enable OCR', value=False) is_ocr = gr.Checkbox(label='Force enable OCR', value=False)
table_enable = gr.Checkbox(label='Enable table recognition(test)', value=False) table_enable = gr.Checkbox(label='Enable table recognition(test)', value=True)
with gr.Row(): with gr.Row():
change_bu = gr.Button('Convert') change_bu = gr.Button('Convert')
clear_bu = gr.ClearButton(value='Clear') clear_bu = gr.ClearButton(value='Clear')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment