barunsaha commited on
Commit
a3eb7e4
·
1 Parent(s): af702c9

Set max page limit as a constant

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. global_config.py +1 -0
app.py CHANGED
@@ -504,7 +504,7 @@ def generate_slide_deck(json_str: str) -> Union[pathlib.Path, None]:
504
 
505
  def get_pdf_contents(
506
  pdf_file: st.runtime.uploaded_file_manager.UploadedFile,
507
- max_pages: int = 20
508
  ) -> str:
509
  """
510
  Extract the text contents from a PDF file.
 
504
 
505
  def get_pdf_contents(
506
  pdf_file: st.runtime.uploaded_file_manager.UploadedFile,
507
+ max_pages: int = GlobalConfig.MAX_PAGE_COUNT
508
  ) -> str:
509
  """
510
  Extract the text contents from a PDF file.
global_config.py CHANGED
@@ -86,6 +86,7 @@ class GlobalConfig:
86
  LLM_MODEL_TEMPERATURE = 0.2
87
  LLM_MODEL_MIN_OUTPUT_LENGTH = 100
88
  LLM_MODEL_MAX_INPUT_LENGTH = 400 # characters
 
89
 
90
  LOG_LEVEL = 'DEBUG'
91
  COUNT_TOKENS = False
 
86
  LLM_MODEL_TEMPERATURE = 0.2
87
  LLM_MODEL_MIN_OUTPUT_LENGTH = 100
88
  LLM_MODEL_MAX_INPUT_LENGTH = 400 # characters
89
+ MAX_PAGE_COUNT = 50
90
 
91
  LOG_LEVEL = 'DEBUG'
92
  COUNT_TOKENS = False