ShiwenNi commited on
Commit
fc55717
·
verified ·
1 Parent(s): 53e1178

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -109,7 +109,7 @@ class Reviewer:
109
 
110
 
111
  def extract_chapter(self, pdf_path):
112
- if isinstance(pdf_path, gr.utils NamedString):
113
  pdf_path = BytesIO(pdf_path.name) # 将NamedString对象转换为BytesIO对象
114
  file_object = BytesIO(pdf_path)
115
  pdf_reader = PyPDF2.PdfReader(file_object)
 
109
 
110
 
111
  def extract_chapter(self, pdf_path):
112
+ if isinstance(pdf_path, gradio.utils NamedString):
113
  pdf_path = BytesIO(pdf_path.name) # 将NamedString对象转换为BytesIO对象
114
  file_object = BytesIO(pdf_path)
115
  pdf_reader = PyPDF2.PdfReader(file_object)