Himanshusingh commited on
Commit
6469f49
1 Parent(s): 215e416

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -44,6 +44,8 @@ def chunk_text_to_window_size_and_predict_proba(input_ids, attention_mask, total
44
 
45
  loop = True
46
  count = 1
 
 
47
  while loop:
48
  end = start + window_length
49
  # If the end index exceeds total length, set the flag to False and adjust the end index
@@ -51,6 +53,9 @@ def chunk_text_to_window_size_and_predict_proba(input_ids, attention_mask, total
51
  loop = False
52
  end = total_len
53
 
 
 
 
54
  # 1 => Define the text chunk
55
  input_ids_chunk = input_ids[start : end]
56
  attention_mask_chunk = attention_mask[start : end]
 
44
 
45
  loop = True
46
  count = 1
47
+ print(f'Total Length: {total_len}')
48
+
49
  while loop:
50
  end = start + window_length
51
  # If the end index exceeds total length, set the flag to False and adjust the end index
 
53
  loop = False
54
  end = total_len
55
 
56
+ print(f'Start: {start}')
57
+ print(f'End: {end}')
58
+
59
  # 1 => Define the text chunk
60
  input_ids_chunk = input_ids[start : end]
61
  attention_mask_chunk = attention_mask[start : end]