Marthee commited on
Commit
2e2d150
·
verified ·
1 Parent(s): 1cd28b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -31,6 +31,13 @@ def process():
31
  print('4')
32
 
33
  # Ensure 'pdftotext.texts_from_pdf' is a valid function
 
 
 
 
 
 
 
34
  pdftext = pdftotext.texts_from_pdf(filePath)
35
  print('5')
36
 
 
31
  print('4')
32
 
33
  # Ensure 'pdftotext.texts_from_pdf' is a valid function
34
+ filePath = filePath.replace('?dl=0', '?dl=1')
35
+
36
+ # Download the PDF
37
+ response = requests.get(pdf_link)
38
+ with open('downloaded_file.pdf', 'wb') as file:
39
+ file.write(response.content)
40
+ print(response.content)
41
  pdftext = pdftotext.texts_from_pdf(filePath)
42
  print('5')
43