HUANG-Stephanie commited on
Commit
74e7ff4
1 Parent(s): 0523b65

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -1,4 +1,3 @@
1
- import io
2
  import os
3
  import sys
4
 
@@ -52,8 +51,8 @@ async def index(files: List[UploadFile] = File(...)):
52
  images = []
53
  ds = []
54
  for file in files:
55
- content = await file.read()
56
- pdf_image_list = convert_from_path(io.BytesIO(content))
57
  images.extend(pdf_image_list)
58
 
59
  dataloader = DataLoader(
 
 
1
  import os
2
  import sys
3
 
 
51
  images = []
52
  ds = []
53
  for file in files:
54
+ content = file.read()
55
+ pdf_image_list = convert_from_bytes(content)
56
  images.extend(pdf_image_list)
57
 
58
  dataloader = DataLoader(