Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -61,7 +61,7 @@ def chunk(text, length, splitter_selection, separators_str, length_unit_selectio
|
|
61 |
|
62 |
def change_preset_separators(choice):
|
63 |
text_splitter = RecursiveCharacterTextSplitter()
|
64 |
-
if choice == "Default
|
65 |
return ["\n\n", "\n", " ", ""]
|
66 |
elif choice == "Markdown":
|
67 |
return text_splitter.get_separators_for_language(Language.MARKDOWN)
|
@@ -134,7 +134,7 @@ with gr.Blocks(theme=gr.themes.Soft(text_size='lg', font=["monospace"], primary_
|
|
134 |
visible=True,
|
135 |
)
|
136 |
separator_preset_selection = gr.Radio(
|
137 |
-
['Default
|
138 |
label="Choose a preset",
|
139 |
info="This will apply a specific set of separators to RecursiveCharacterTextSplitter.",
|
140 |
visible=True,
|
|
|
61 |
|
62 |
def change_preset_separators(choice):
|
63 |
text_splitter = RecursiveCharacterTextSplitter()
|
64 |
+
if choice == "Default":
|
65 |
return ["\n\n", "\n", " ", ""]
|
66 |
elif choice == "Markdown":
|
67 |
return text_splitter.get_separators_for_language(Language.MARKDOWN)
|
|
|
134 |
visible=True,
|
135 |
)
|
136 |
separator_preset_selection = gr.Radio(
|
137 |
+
['Default', 'Python', 'Markdown'],
|
138 |
label="Choose a preset",
|
139 |
info="This will apply a specific set of separators to RecursiveCharacterTextSplitter.",
|
140 |
visible=True,
|