|
@@ -31,7 +31,11 @@ if os.getenv('USE_CUDA') == 'gpu':
|
|
print(f'use gpu: {use_gpu}')
|
|
print(f'use gpu: {use_gpu}')
|
|
|
|
|
|
# 初始化模型
|
|
# 初始化模型
|
|
-table_engine = PPStructure(layout=False, table=True, show_log=True, table_model_dir="./tabel_ocr_infer")
|
|
|
|
|
|
+table_engine = PPStructure(layout=False,
|
|
|
|
+ table=True,
|
|
|
|
+ use_gpu=use_gpu,
|
|
|
|
+ show_log=True,
|
|
|
|
+ table_model_dir="./tabel_ocr_infer")
|
|
|
|
|
|
|
|
|
|
class TableInfo(BaseModel):
|
|
class TableInfo(BaseModel):
|