ShiwenNi commited on
Commit
941d4b9
1 Parent(s): 22b63c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -116,14 +116,13 @@ class Reviewer:
116
  page = pdf_reader.pages[page_number]
117
  page_text = page.extract_text()
118
 
119
- # 如果找到了章节标题,开始提取
120
- if 'Abstract'.lower() in page_text.lower() and not extraction_started:
121
- extraction_started = True
122
- page_number_start = page_number
123
  # 如果提取已开始,将页面文本添加到提取文本中
124
  if extraction_started:
125
  extracted_text += page_text
126
- # 如果找到下一章节标题,停止提取
127
  if page_number_start + 1 < page_number:
128
  break
129
  return extracted_text
 
116
  page = pdf_reader.pages[page_number]
117
  page_text = page.extract_text()
118
 
119
+ # 开始提取
120
+ extraction_started = True
121
+ page_number_start = page_number
 
122
  # 如果提取已开始,将页面文本添加到提取文本中
123
  if extraction_started:
124
  extracted_text += page_text
125
+ # 停止提取
126
  if page_number_start + 1 < page_number:
127
  break
128
  return extracted_text