Commit ·
6469f49
1
Parent(s): 215e416
Update app.py
Browse files43 unmodified lines4445464748491 unmodified line51525354555643 unmodified linesloop = Truecount = 1while loop:end = start + window_length# If the end index exceeds total length, set the flag to False and adjust the end index1 unmodified lineloop = Falseend = total_len# 1 => Define the text chunkinput_ids_chunk = input_ids[start : end]attention_mask_chunk = attention_mask[start : end]43 unmodified lines44454647484950511 unmodified line53545556575859606143 unmodified linesloop = Truecount = 1print(f'Total Length: {total_len}')while loop:end = start + window_length# If the end index exceeds total length, set the flag to False and adjust the end index1 unmodified lineloop = Falseend = total_lenprint(f'Start: {start}')print(f'End: {end}')# 1 => Define the text chunkinput_ids_chunk = input_ids[start : end]attention_mask_chunk = attention_mask[start : end]
app.py+5