Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,8 +5,8 @@ from langchain.text_splitter import (
|
|
| 5 |
)
|
| 6 |
from transformers import AutoTokenizer
|
| 7 |
|
| 8 |
-
LABEL_TEXTSPLITTER = "LangChain's CharacterTextSplitter"
|
| 9 |
-
LABEL_RECURSIVE = "LangChain's RecursiveCharacterTextSplitter"
|
| 10 |
|
| 11 |
bert_tokenizer = AutoTokenizer.from_pretrained('google-bert/bert-base-uncased')
|
| 12 |
|
|
@@ -113,7 +113,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css="#textbox_id {color: red; font-samily
|
|
| 113 |
LABEL_RECURSIVE,
|
| 114 |
],
|
| 115 |
value=LABEL_TEXTSPLITTER,
|
| 116 |
-
label="Chunking method
|
| 117 |
)
|
| 118 |
separator_selection = gr.Textbox(
|
| 119 |
elem_id="textbox_id",
|
|
@@ -132,7 +132,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css="#textbox_id {color: red; font-samily
|
|
| 132 |
info="How should we count our chunk lengths?",
|
| 133 |
)
|
| 134 |
slider_count = gr.Slider(
|
| 135 |
-
20, 500, value=50, label="
|
| 136 |
)
|
| 137 |
out = gr.HighlightedText(
|
| 138 |
label="Output",
|
|
|
|
| 5 |
)
|
| 6 |
from transformers import AutoTokenizer
|
| 7 |
|
| 8 |
+
LABEL_TEXTSPLITTER = "๐ฆ๐ LangChain's CharacterTextSplitter"
|
| 9 |
+
LABEL_RECURSIVE = "๐ฆ๐ LangChain's RecursiveCharacterTextSplitter"
|
| 10 |
|
| 11 |
bert_tokenizer = AutoTokenizer.from_pretrained('google-bert/bert-base-uncased')
|
| 12 |
|
|
|
|
| 113 |
LABEL_RECURSIVE,
|
| 114 |
],
|
| 115 |
value=LABEL_TEXTSPLITTER,
|
| 116 |
+
label="๐ซทChunking method๐ซธ",
|
| 117 |
)
|
| 118 |
separator_selection = gr.Textbox(
|
| 119 |
elem_id="textbox_id",
|
|
|
|
| 132 |
info="How should we count our chunk lengths?",
|
| 133 |
)
|
| 134 |
slider_count = gr.Slider(
|
| 135 |
+
20, 500, value=50, label="Length ๐", info="Chunk length, in the chosen unit."
|
| 136 |
)
|
| 137 |
out = gr.HighlightedText(
|
| 138 |
label="Output",
|