awacke1 commited on
Commit
cad979c
·
1 Parent(s): e241a76

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -226,7 +226,7 @@ def pdf2txt(pdf_docs):
226
  # You need to replace the following lines with actual file reading
227
  # based on the file_extension
228
  if file_extension in ['txt', 'html', 'htm', 'py', 'xml', 'json']:
229
- text += textract.process(str(file).decode("utf-8") )
230
  text += f"\nExtracted text from {file_extension} file..."
231
  elif file_extension == 'pdf':
232
  pdf_reader = PdfReader(file)
 
226
  # You need to replace the following lines with actual file reading
227
  # based on the file_extension
228
  if file_extension in ['txt', 'html', 'htm', 'py', 'xml', 'json']:
229
+ text += textract.process(str(file))
230
  text += f"\nExtracted text from {file_extension} file..."
231
  elif file_extension == 'pdf':
232
  pdf_reader = PdfReader(file)