Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
121 |
-
|
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
|