Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -20,8 +20,7 @@ def extract_separators_from_string(separators_str):
|
|
20 |
|
21 |
def change_split_selection(text, slider_count, split_selection, separator_selection):
|
22 |
print("Updating separator selection interactivity:")
|
23 |
-
|
24 |
-
return chunk(text, slider_count, split_selection, separator_selection)
|
25 |
|
26 |
|
27 |
def chunk(text, length, splitter_selection, separators_str):
|
@@ -129,7 +128,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css="#textbox_id {color: red, font-samily
|
|
129 |
split_selection.change(
|
130 |
fn=change_split_selection,
|
131 |
inputs=[text, slider_count, split_selection, separator_selection],
|
132 |
-
outputs=out,
|
133 |
)
|
134 |
slider_count.change(
|
135 |
fn=chunk,
|
|
|
20 |
|
21 |
def change_split_selection(text, slider_count, split_selection, separator_selection):
|
22 |
print("Updating separator selection interactivity:")
|
23 |
+
return gr.Textbox.update(interactive=(split_selection==LABEL_RECURSIVE)), chunk(text, slider_count, split_selection, separator_selection)
|
|
|
24 |
|
25 |
|
26 |
def chunk(text, length, splitter_selection, separators_str):
|
|
|
128 |
split_selection.change(
|
129 |
fn=change_split_selection,
|
130 |
inputs=[text, slider_count, split_selection, separator_selection],
|
131 |
+
outputs=[separator_selection, out],
|
132 |
)
|
133 |
slider_count.change(
|
134 |
fn=chunk,
|