pszemraj commited on
Commit
defd486
โ€ข
1 Parent(s): 7e0dde7

๐Ÿ› fix env variable name

Browse files

Signed-off-by: peter szemraj <peterszemraj@gmail.com>

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -305,7 +305,7 @@ def load_single_example_text(
305
  text = clean(raw_text, lower=False)
306
  elif full_ex_path.suffix == ".pdf":
307
  logging.info(f"Loading PDF file {full_ex_path}")
308
- max_pages = int(os.environ.get("APP_MAX_PAGES", max_pages))
309
  logging.info(f"max_pages set to: {max_pages}")
310
  conversion_stats = convert_PDF_to_Text(
311
  full_ex_path,
@@ -343,7 +343,7 @@ def load_uploaded_file(file_obj, max_pages: int = 20, lower: bool = False) -> st
343
  text = clean(raw_text, lower=lower)
344
  elif file_path.suffix == ".pdf":
345
  logger.info(f"loading a PDF file: {file_path.name}")
346
- max_pages = int(os.environ.get("APP_MAX_PAGES", max_pages))
347
  logger.info(f"max_pages is: {max_pages}. Starting conversion...")
348
  conversion_stats = convert_PDF_to_Text(
349
  file_path,
 
305
  text = clean(raw_text, lower=False)
306
  elif full_ex_path.suffix == ".pdf":
307
  logging.info(f"Loading PDF file {full_ex_path}")
308
+ max_pages = int(os.environ.get("APP_OCR_MAX_PAGES", max_pages))
309
  logging.info(f"max_pages set to: {max_pages}")
310
  conversion_stats = convert_PDF_to_Text(
311
  full_ex_path,
 
343
  text = clean(raw_text, lower=lower)
344
  elif file_path.suffix == ".pdf":
345
  logger.info(f"loading a PDF file: {file_path.name}")
346
+ max_pages = int(os.environ.get("APP_OCR_MAX_PAGES", max_pages))
347
  logger.info(f"max_pages is: {max_pages}. Starting conversion...")
348
  conversion_stats = convert_PDF_to_Text(
349
  file_path,