File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -42,29 +42,29 @@ with open(filename, "rb") as f:
4242 content = f.read(),
4343 file_name = filename,
4444 )
45- req = shared.PartitionParameters(
46- files = files,
47- strategy = " fast" ,
48- )
49- # Other partition params
50- strategy= " fast" ,
45+
46+ req = shared.PartitionParameters(
47+ files = files,
48+ strategy = ' ocr_only' ,
49+ languages = [" eng" ],
5150)
5251
5352try :
54- res = s.general.partition(req)
55- print (res .elements[0 ])
53+ resp = s.general.partition(req)
54+ print (resp .elements[0 ])
5655except SDKError as e:
5756 print (e)
5857
5958# {
6059# 'type': 'UncategorizedText',
61- # 'element_id': '5d05cfc3c8e4a52fd1b3b8bd26648010 ',
60+ # 'element_id': 'fc550084fda1e008e07a0356894f5816 ',
6261# 'metadata': {
6362# 'filename': 'layout-parser-paper-fast.pdf',
6463# 'filetype': 'application/pdf',
64+ # 'languages': ['eng'],
6565# 'page_number': 1
6666# },
67- # 'text': '1 2 0 2 '
67+ # 'text': '2103.15348v2 [cs.CV] 21 Jun 2021 '
6868# }
6969```
7070
You can’t perform that action at this time.
0 commit comments