Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -90,18 +90,19 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 90 |
value=["\n\n", "\n", ".", " ", ""],
|
| 91 |
label="Separators used in RecursiveCharacterTextSplitter",
|
| 92 |
)
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
|
|
|
| 105 |
out = gr.HighlightedText(
|
| 106 |
label="Output",
|
| 107 |
show_legend=True,
|
|
|
|
| 90 |
value=["\n\n", "\n", ".", " ", ""],
|
| 91 |
label="Separators used in RecursiveCharacterTextSplitter",
|
| 92 |
)
|
| 93 |
+
with gr.Row():
|
| 94 |
+
length_unit_selection = gr.Dropdown(
|
| 95 |
+
choices=[
|
| 96 |
+
"Character count",
|
| 97 |
+
"Token count",
|
| 98 |
+
],
|
| 99 |
+
value="Token count",
|
| 100 |
+
label="Length count",
|
| 101 |
+
info="How should we count our chunk lengths?",
|
| 102 |
+
)
|
| 103 |
+
slider_count = gr.Slider(
|
| 104 |
+
20, 500, value=50, label="Count 🧮", info="Chunk size, in the chosen unit."
|
| 105 |
+
)
|
| 106 |
out = gr.HighlightedText(
|
| 107 |
label="Output",
|
| 108 |
show_legend=True,
|