Marthee commited on
Commit
0efb828
·
verified ·
1 Parent(s): 10e618d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -54,7 +54,7 @@ def getpdfcontent(pdf_path):
54
  response = requests.get(pdf_path)
55
  pdf_bytes = response.content
56
 
57
- if not pdf_bytes or not pdf_bytes.startswith(b"%PDF"):
58
  raise ValueError("No valid PDF content found.")
59
 
60
  # Convert to BytesIO only after validation
 
54
  response = requests.get(pdf_path)
55
  pdf_bytes = response.content
56
 
57
+ if not pdf_bytes:
58
  raise ValueError("No valid PDF content found.")
59
 
60
  # Convert to BytesIO only after validation