ConradLax commited on
Commit
bfe2a73
·
1 Parent(s): 22a863e

test: poppler path

Browse files
Files changed (1) hide show
  1. main.py +2 -1
main.py CHANGED
@@ -13,7 +13,7 @@ from transformers import pipeline
13
  app = FastAPI()
14
 
15
  """## Poppler dir"""
16
- poppler_path = "/app/poppler-23.11.0/Library/bin"
17
 
18
 
19
  @app.post("/classify")
@@ -27,6 +27,7 @@ async def classify_doc(files: List[UploadFile] = File(...)):
27
 
28
  if filename.endswith('.pdf'):
29
  try:
 
30
  pages = convert_from_bytes(contents, poppler_path = poppler_path)
31
  print(pages)
32
  for pagenum, image in enumerate(pages):
 
13
  app = FastAPI()
14
 
15
  """## Poppler dir"""
16
+ poppler_path = "poppler-23.11.0/Library/bin"
17
 
18
 
19
  @app.post("/classify")
 
27
 
28
  if filename.endswith('.pdf'):
29
  try:
30
+ print("poppler: " + poppler_path)
31
  pages = convert_from_bytes(contents, poppler_path = poppler_path)
32
  print(pages)
33
  for pagenum, image in enumerate(pages):