m-ric HF staff commited on
Commit
60ca977
1 Parent(s): 6161180

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -59,7 +59,8 @@ def chunk(text, length, splitter_selection, separators_str, length_unit_selectio
59
 
60
  unoverlapped_text_splits = unoverlap_list(text_splits)
61
 
62
- output = [(split[0], str(i+1)) for i, split in enumerate(unoverlapped_text_splits)]
 
63
  return output
64
 
65
 
@@ -126,7 +127,7 @@ with gr.Blocks(theme=gr.themes.Soft(text_size='lg', font=["monospace"], primary_
126
  show_label=False, # or set label to an empty string if you want to keep its space
127
  visible=False,
128
  )
129
- with gr.Row(theme=gr.themes.Soft(text_size='lg', font=["monospace"], primary_hue=gr.themes.colors.red)):
130
  length_unit_selection = gr.Dropdown(
131
  choices=[
132
  "Character count",
 
59
 
60
  unoverlapped_text_splits = unoverlap_list(text_splits)
61
 
62
+ output = [((split[0], 0) if split[1] else (split[0], str(i+1))) for i, split in enumerate(unoverlapped_text_splits)]
63
+ print(output)
64
  return output
65
 
66
 
 
127
  show_label=False, # or set label to an empty string if you want to keep its space
128
  visible=False,
129
  )
130
+ with gr.Row():
131
  length_unit_selection = gr.Dropdown(
132
  choices=[
133
  "Character count",