Spaces:
Running
Running
wangrongsheng
commited on
Commit
•
e975e7f
1
Parent(s):
a04bf88
Update app.py
Browse files
app.py
CHANGED
@@ -174,7 +174,7 @@ class Paper:
|
|
174 |
max_font_size = 0 # 初始化最大字体大小为0
|
175 |
max_string = "" # 初始化最大字体大小对应的字符串为空
|
176 |
max_font_sizes = [0]
|
177 |
-
for page in doc: # 遍历每一页
|
178 |
text = page.get_text("dict") # 获取页面上的文本信息
|
179 |
blocks = text["blocks"] # 获取文本块列表
|
180 |
for block in blocks: # 遍历每个文本块
|
@@ -188,7 +188,7 @@ class Paper:
|
|
188 |
max_font_sizes.sort()
|
189 |
print("max_font_sizes", max_font_sizes[-10:])
|
190 |
cur_title = ''
|
191 |
-
for page in doc: # 遍历每一页
|
192 |
text = page.get_text("dict") # 获取页面上的文本信息
|
193 |
blocks = text["blocks"] # 获取文本块列表
|
194 |
for block in blocks: # 遍历每个文本块
|
|
|
174 |
max_font_size = 0 # 初始化最大字体大小为0
|
175 |
max_string = "" # 初始化最大字体大小对应的字符串为空
|
176 |
max_font_sizes = [0]
|
177 |
+
for page_index, page in enumerate(doc): # 遍历每一页
|
178 |
text = page.get_text("dict") # 获取页面上的文本信息
|
179 |
blocks = text["blocks"] # 获取文本块列表
|
180 |
for block in blocks: # 遍历每个文本块
|
|
|
188 |
max_font_sizes.sort()
|
189 |
print("max_font_sizes", max_font_sizes[-10:])
|
190 |
cur_title = ''
|
191 |
+
for page_index, page in enumerate(doc): # 遍历每一页
|
192 |
text = page.get_text("dict") # 获取页面上的文本信息
|
193 |
blocks = text["blocks"] # 获取文本块列表
|
194 |
for block in blocks: # 遍历每个文本块
|