rizgiak commited on
Commit
e7af8f7
·
1 Parent(s): 737c08b

uncommitted changes

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -19,7 +19,7 @@ ocr = PaddleOCR(use_angle_cls=True, lang="en", use_gpu=False, ocr_version='PP-OC
19
 
20
  st.set_option('deprecation.showPyplotGlobalUse', False)
21
  st.set_page_config(layout='wide')
22
- st.title("Table Detection and Table Structure Recognition")
23
  st.write(
24
  "Implemented by MSFT team: https://github.com/microsoft/table-transformer")
25
 
@@ -641,7 +641,7 @@ class TableExtractionPipeline():
641
  caption_ocr_res = await asyncio.gather(*sequential_caption_img_list)
642
  flag_caption_pos = 0 # 0=top, 1=bottom
643
  for idx, caption_text in enumerate(caption_ocr_res):
644
- if caption_text == "" or "table" not in caption_text.lower():
645
  if idx%2==0:
646
  flag_caption_pos=1
647
  break
 
19
 
20
  st.set_option('deprecation.showPyplotGlobalUse', False)
21
  st.set_page_config(layout='wide')
22
+ st.title("Table Detection and Table Structure Recognition + Caption")
23
  st.write(
24
  "Implemented by MSFT team: https://github.com/microsoft/table-transformer")
25
 
 
641
  caption_ocr_res = await asyncio.gather(*sequential_caption_img_list)
642
  flag_caption_pos = 0 # 0=top, 1=bottom
643
  for idx, caption_text in enumerate(caption_ocr_res):
644
+ if caption_text == "" or "table" not in caption_text.lower() or "表" not in caption_text.lower():
645
  if idx%2==0:
646
  flag_caption_pos=1
647
  break