PirateXX commited on
Commit
a102ee8
·
1 Parent(s): 4bc60b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -18,7 +18,7 @@ def text_to_sentences(text):
18
  return re.split(r'[.!?]', text)
19
 
20
  # function to concatenate sentences into chunks of size 900 or less
21
- def chunks_of_900(text, chunk_size=900):
22
  sentences = text_to_sentences(text)
23
  chunks = []
24
  current_chunk = ""
@@ -47,7 +47,7 @@ def predict(query, device="cpu"):
47
  return real
48
 
49
  def findRealProb(text):
50
- chunksOfText = (chunks_of_900(text))
51
  results = []
52
  for chunk in chunksOfText:
53
  output = predict(chunk)
 
18
  return re.split(r'[.!?]', text)
19
 
20
  # function to concatenate sentences into chunks of size 900 or less
21
+ def chunks_of_600(text, chunk_size=600):
22
  sentences = text_to_sentences(text)
23
  chunks = []
24
  current_chunk = ""
 
47
  return real
48
 
49
  def findRealProb(text):
50
+ chunksOfText = (chunks_of_600(text))
51
  results = []
52
  for chunk in chunksOfText:
53
  output = predict(chunk)