m-ric HF staff commited on
Commit
e80eb77
โ€ข
1 Parent(s): e644d1d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -118,7 +118,7 @@ with gr.Blocks(theme=gr.themes.Soft(text_size='lg', font=["monospace"], primary_
118
  value=LABEL_TEXTSPLITTER,
119
  label="Method to split chunks ๐Ÿž",
120
  )
121
- separator_selection = gr.Textbox(
122
  elem_id="textbox_id",
123
  value=["### ", "\n\n", "\n", ".", " "],
124
  info="Separators used in RecursiveCharacterTextSplitter",
@@ -155,11 +155,11 @@ with gr.Blocks(theme=gr.themes.Soft(text_size='lg', font=["monospace"], primary_
155
 
156
  split_selection.change(
157
  fn=change_split_selection,
158
- inputs=[text, slider_count, split_selection, separator_selection, length_unit_selection, chunk_overlap],
159
- outputs=[separator_selection, out],
160
  )
161
  gr.on(
162
- [text.change, length_unit_selection.change, separator_selection.change, slider_count.change, chunk_overlap.change],
163
  chunk,
164
  [text, slider_count, split_selection, separators_selection, length_unit_selection, chunk_overlap],
165
  outputs=out
 
118
  value=LABEL_TEXTSPLITTER,
119
  label="Method to split chunks ๐Ÿž",
120
  )
121
+ separators_selection = gr.Textbox(
122
  elem_id="textbox_id",
123
  value=["### ", "\n\n", "\n", ".", " "],
124
  info="Separators used in RecursiveCharacterTextSplitter",
 
155
 
156
  split_selection.change(
157
  fn=change_split_selection,
158
+ inputs=[text, slider_count, split_selection, separators_selection, length_unit_selection, chunk_overlap],
159
+ outputs=[separators_selection, out],
160
  )
161
  gr.on(
162
+ [text.change, length_unit_selection.change, separators_selection.change, slider_count.change, chunk_overlap.change],
163
  chunk,
164
  [text, slider_count, split_selection, separators_selection, length_unit_selection, chunk_overlap],
165
  outputs=out