Spaces:
Running
Running
Luis J Camargo commited on
Commit ·
cec97f0
1
Parent(s): 378d343
refactor: Update PaddleOCR-VL model to 1.5 in configuration generation and remove the default.yaml file.
Browse files- app.py +1 -1
- default.yaml +0 -104
app.py
CHANGED
|
@@ -77,7 +77,7 @@ def setup_pipeline():
|
|
| 77 |
logger.info(f"⚠️ {CONFIG_FILE} not found. Generating default configuration via paddlex CLI...")
|
| 78 |
try:
|
| 79 |
subprocess.run(
|
| 80 |
-
["paddlex", "--get_pipeline_config", "PaddleOCR-VL", "--save_path", "./"],
|
| 81 |
capture_output=True, text=True, check=True
|
| 82 |
)
|
| 83 |
if os.path.exists(GENERATED_CONFIG):
|
|
|
|
| 77 |
logger.info(f"⚠️ {CONFIG_FILE} not found. Generating default configuration via paddlex CLI...")
|
| 78 |
try:
|
| 79 |
subprocess.run(
|
| 80 |
+
["paddlex", "--get_pipeline_config", "PaddleOCR-VL-1.5", "--save_path", "./"],
|
| 81 |
capture_output=True, text=True, check=True
|
| 82 |
)
|
| 83 |
if os.path.exists(GENERATED_CONFIG):
|
default.yaml
DELETED
|
@@ -1,104 +0,0 @@
|
|
| 1 |
-
Serving:
|
| 2 |
-
extra:
|
| 3 |
-
max_num_input_imgs: null
|
| 4 |
-
SubModules:
|
| 5 |
-
LayoutDetection:
|
| 6 |
-
batch_size: 8
|
| 7 |
-
layout_merge_bboxes_mode:
|
| 8 |
-
0: union
|
| 9 |
-
1: union
|
| 10 |
-
2: union
|
| 11 |
-
3: large
|
| 12 |
-
4: union
|
| 13 |
-
5: large
|
| 14 |
-
6: large
|
| 15 |
-
7: union
|
| 16 |
-
8: union
|
| 17 |
-
9: union
|
| 18 |
-
10: union
|
| 19 |
-
11: union
|
| 20 |
-
12: union
|
| 21 |
-
13: union
|
| 22 |
-
14: union
|
| 23 |
-
15: large
|
| 24 |
-
16: union
|
| 25 |
-
17: large
|
| 26 |
-
18: union
|
| 27 |
-
19: union
|
| 28 |
-
20: union
|
| 29 |
-
21: union
|
| 30 |
-
22: union
|
| 31 |
-
23: union
|
| 32 |
-
24: union
|
| 33 |
-
layout_nms: true
|
| 34 |
-
layout_unclip_ratio:
|
| 35 |
-
- 1.0
|
| 36 |
-
- 1.0
|
| 37 |
-
model_dir: null
|
| 38 |
-
model_name: PP-DocLayoutV2
|
| 39 |
-
module_name: layout_detection
|
| 40 |
-
threshold:
|
| 41 |
-
0: 0.5
|
| 42 |
-
1: 0.5
|
| 43 |
-
2: 0.5
|
| 44 |
-
3: 0.5
|
| 45 |
-
4: 0.5
|
| 46 |
-
5: 0.4
|
| 47 |
-
6: 0.4
|
| 48 |
-
7: 0.5
|
| 49 |
-
8: 0.5
|
| 50 |
-
9: 0.5
|
| 51 |
-
10: 0.5
|
| 52 |
-
11: 0.5
|
| 53 |
-
12: 0.5
|
| 54 |
-
13: 0.5
|
| 55 |
-
14: 0.5
|
| 56 |
-
15: 0.4
|
| 57 |
-
16: 0.5
|
| 58 |
-
17: 0.4
|
| 59 |
-
18: 0.5
|
| 60 |
-
19: 0.5
|
| 61 |
-
20: 0.45
|
| 62 |
-
21: 0.5
|
| 63 |
-
22: 0.4
|
| 64 |
-
23: 0.4
|
| 65 |
-
24: 0.5
|
| 66 |
-
VLRecognition:
|
| 67 |
-
batch_size: -1
|
| 68 |
-
genai_config:
|
| 69 |
-
backend: native
|
| 70 |
-
model_dir: tachiwin/Tachiwin-OCR-1.5
|
| 71 |
-
model_name: PaddleOCR-VL-1.5-0.9B
|
| 72 |
-
module_name: vl_recognition
|
| 73 |
-
SubPipelines:
|
| 74 |
-
DocPreprocessor:
|
| 75 |
-
SubModules:
|
| 76 |
-
DocOrientationClassify:
|
| 77 |
-
batch_size: 8
|
| 78 |
-
model_dir: null
|
| 79 |
-
model_name: PP-LCNet_x1_0_doc_ori
|
| 80 |
-
module_name: doc_text_orientation
|
| 81 |
-
DocUnwarping:
|
| 82 |
-
model_dir: null
|
| 83 |
-
model_name: UVDoc
|
| 84 |
-
module_name: image_unwarping
|
| 85 |
-
batch_size: 8
|
| 86 |
-
pipeline_name: doc_preprocessor
|
| 87 |
-
use_doc_orientation_classify: true
|
| 88 |
-
use_doc_unwarping: true
|
| 89 |
-
batch_size: 64
|
| 90 |
-
format_block_content: false
|
| 91 |
-
markdown_ignore_labels:
|
| 92 |
-
- number
|
| 93 |
-
- footnote
|
| 94 |
-
- header
|
| 95 |
-
- header_image
|
| 96 |
-
- footer
|
| 97 |
-
- footer_image
|
| 98 |
-
- aside_text
|
| 99 |
-
merge_layout_blocks: true
|
| 100 |
-
pipeline_name: PaddleOCR-VL
|
| 101 |
-
use_chart_recognition: false
|
| 102 |
-
use_doc_preprocessor: false
|
| 103 |
-
use_layout_detection: true
|
| 104 |
-
use_queues: true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|