bhaskartripathi commited on
Commit
bee8306
·
1 Parent(s): 14fefb4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -24,6 +24,10 @@ def pdf_to_text(path, start_page=1, end_page=None):
24
 
25
  if end_page is None:
26
  end_page = total_pages
 
 
 
 
27
 
28
  text_list = []
29
 
@@ -36,6 +40,7 @@ def pdf_to_text(path, start_page=1, end_page=None):
36
  return text_list
37
 
38
 
 
39
  def text_to_chunks(texts, word_length=150, start_page=1):
40
  text_toks = [t.split(' ') for t in texts]
41
  page_nums = []
 
24
 
25
  if end_page is None:
26
  end_page = total_pages
27
+ else:
28
+ end_page = int(end_page)
29
+
30
+ start_page = int(start_page)
31
 
32
  text_list = []
33
 
 
40
  return text_list
41
 
42
 
43
+
44
  def text_to_chunks(texts, word_length=150, start_page=1):
45
  text_toks = [t.split(' ') for t in texts]
46
  page_nums = []