zeke-chin 2 years ago
parent
commit
2fc720fbe9
4 changed files with 4 additions and 9 deletions
  1. BIN
      inference.pdiparams
  2. BIN
      inference.pdiparams.info
  3. BIN
      inference.pdmodel
  4. 4 9
      server.py

BIN
inference.pdiparams


BIN
inference.pdiparams.info


BIN
inference.pdmodel


+ 4 - 9
server.py

@@ -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):