Spaces:
Running
Running
jeffrey
commited on
Commit
•
2a58fa0
1
Parent(s):
6569519
delete Konlpy because in huggingface space I cannot install jdk
Browse files
app.py
CHANGED
@@ -89,9 +89,6 @@ def run_chunk(use_existed_raw: bool, raw_file: str, chunk_method: str, chunk_siz
|
|
89 |
elif chunk_method == "Recursive":
|
90 |
corpus = raw_instance.chunk("langchain_chunk", chunk_method="recursivecharacter",
|
91 |
add_file_name=lang, chunk_size=chunk_size, chunk_overlap=chunk_overlap)
|
92 |
-
elif chunk_method == "Konlpy🇰🇷":
|
93 |
-
corpus = raw_instance.chunk("langchain_chunk", chunk_method="konlpy", add_file_name=lang,
|
94 |
-
chunk_size=chunk_size, chunk_overlap=chunk_overlap)
|
95 |
else:
|
96 |
gr.Error("Unsupported chunk method.")
|
97 |
return "Unsupported chunk method."
|
@@ -182,7 +179,7 @@ with gr.Blocks(theme="earneleh/paris") as demo:
|
|
182 |
use_previous_raw_file = gr.Checkbox(label="Use previous raw.parquet", value=True)
|
183 |
|
184 |
chunk_choice = gr.Dropdown(
|
185 |
-
["Token", "Sentence", "Semantic", "Recursive"
|
186 |
label="Chunking Method", info="Choose chunking method that you want")
|
187 |
chunk_size = gr.Slider(minimum=128, maximum=1024, step=128, label="Chunk Size", value=256)
|
188 |
chunk_overlap = gr.Slider(minimum=16, maximum=256, step=16, label="Chunk Overlap", value=32)
|
|
|
89 |
elif chunk_method == "Recursive":
|
90 |
corpus = raw_instance.chunk("langchain_chunk", chunk_method="recursivecharacter",
|
91 |
add_file_name=lang, chunk_size=chunk_size, chunk_overlap=chunk_overlap)
|
|
|
|
|
|
|
92 |
else:
|
93 |
gr.Error("Unsupported chunk method.")
|
94 |
return "Unsupported chunk method."
|
|
|
179 |
use_previous_raw_file = gr.Checkbox(label="Use previous raw.parquet", value=True)
|
180 |
|
181 |
chunk_choice = gr.Dropdown(
|
182 |
+
["Token", "Sentence", "Semantic", "Recursive"],
|
183 |
label="Chunking Method", info="Choose chunking method that you want")
|
184 |
chunk_size = gr.Slider(minimum=128, maximum=1024, step=128, label="Chunk Size", value=256)
|
185 |
chunk_overlap = gr.Slider(minimum=16, maximum=256, step=16, label="Chunk Overlap", value=32)
|