Просмотр исходного кода

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

myhloli 10 месяцев назад
Родитель
Сommit
bdfdfea6f8
2 измененных файлов с 3 добавлено и 3 удалено
  1. 1 1
      magic-pdf.template.json
  2. 2 2
      projects/gradio_app/app.py

+ 1 - 1
magic-pdf.template.json

@@ -16,7 +16,7 @@
     },
     "table-config": {
         "model": "rapid_table",
-        "enable": false,
+        "enable": true,
         "max_time": 400
     },
     "llm-aided-config": {

+ 2 - 2
projects/gradio_app/app.py

@@ -192,12 +192,12 @@ if __name__ == '__main__':
                 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')
                 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='')
                 with gr.Row():
                     formula_enable = gr.Checkbox(label='Enable formula recognition', value=True)
                     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():
                     change_bu = gr.Button('Convert')
                     clear_bu = gr.ClearButton(value='Clear')