Fix: use yolox model (available on 103) + hi_res + GPU for maximum quality
This commit is contained in:
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
"""
|
"""
|
||||||
Parse PDF document using unstructured-api on 192.168.1.103.
|
Parse PDF document using unstructured-api on 192.168.1.103.
|
||||||
Uses maximum quality settings (hi_res + GPU).
|
Uses maximum quality settings (hi_res + yolox model).
|
||||||
Saves parsed JSON to /tmp/pol177_parsed.json.
|
Saves parsed JSON to /tmp/pol177_parsed.json.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -13,12 +13,12 @@ PDF_PATH = "/opt/documents_xk/АОХКСибцем/07 Служба Вице-пр
|
|||||||
API_URL = "http://192.168.1.103:8005/general/v0/general"
|
API_URL = "http://192.168.1.103:8005/general/v0/general"
|
||||||
|
|
||||||
def parse_pdf():
|
def parse_pdf():
|
||||||
print("Parsing PDF with maximum quality (hi_res + GPU)...")
|
print("Parsing PDF with maximum quality (hi_res + yolox)...")
|
||||||
|
|
||||||
# Maximum quality parameters
|
# Maximum quality parameters
|
||||||
form_data = {
|
form_data = {
|
||||||
'strategy': 'hi_res',
|
'strategy': 'hi_res',
|
||||||
'hi_res_model_name': 'chipper',
|
'hi_res_model_name': 'yolox',
|
||||||
'pdf_infer_table_structure': 'true',
|
'pdf_infer_table_structure': 'true',
|
||||||
'extract_images': 'true',
|
'extract_images': 'true',
|
||||||
'extract_image_block_types': '["image", "table"]',
|
'extract_image_block_types': '["image", "table"]',
|
||||||
|
|||||||
Reference in New Issue
Block a user