|
@@ -24,22 +24,17 @@ app.add_middleware(
|
|
|
allow_headers=["*"],
|
|
|
)
|
|
|
|
|
|
-use_gpu = False
|
|
|
-if os.getenv('USE_CUDA') == 'gpu':
|
|
|
- use_gpu = True
|
|
|
-
|
|
|
+use_gpu = os.getenv('USE_CUDA') == 'gpu'
|
|
|
print(f'use gpu: {use_gpu}')
|
|
|
|
|
|
# 初始化模型
|
|
|
-<<<<<<< HEAD
|
|
|
-table_engine = PPStructure(layout=False, table=True, show_log=True, table_model_dir="/Users/sxkj/opt/python-workspace/yili-ocr/ocr-table/SLANet/")
|
|
|
-=======
|
|
|
table_engine = PPStructure(layout=False,
|
|
|
table=True,
|
|
|
use_gpu=use_gpu,
|
|
|
show_log=True,
|
|
|
- table_model_dir="./tabel_ocr_infer")
|
|
|
->>>>>>> d046d2d76465ba7ba4d8c3e2cdad1ec5e7ac3b69
|
|
|
+ table_model_dir="./SLANet")
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
class TableInfo(BaseModel):
|