Spaces:
Sleeping
Sleeping
arman77mxx
commited on
Commit
•
959ae62
1
Parent(s):
97acbde
TextSplitter
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from llama_index.node_parser import SimpleNodeParser
|
|
5 |
from llama_index.query_engine import RetrieverQueryEngine
|
6 |
from llama_index.embeddings.openai import OpenAIEmbedding
|
7 |
from llama_index.llms import OpenAI
|
8 |
-
from llama_index.text_splitter import
|
9 |
|
10 |
# Configuración inicial y variables de entorno
|
11 |
st.title("Busca en PDFs")
|
@@ -47,7 +47,7 @@ if OPENAI_API_KEY and SMITH_APIKEY:
|
|
47 |
return cleaned_text
|
48 |
|
49 |
# Particionar datos
|
50 |
-
text_splitter =
|
51 |
chunk_size=1024,
|
52 |
chunk_overlap=200
|
53 |
)
|
|
|
5 |
from llama_index.query_engine import RetrieverQueryEngine
|
6 |
from llama_index.embeddings.openai import OpenAIEmbedding
|
7 |
from llama_index.llms import OpenAI
|
8 |
+
from llama_index.text_splitter import TokenTextSplitter
|
9 |
|
10 |
# Configuración inicial y variables de entorno
|
11 |
st.title("Busca en PDFs")
|
|
|
47 |
return cleaned_text
|
48 |
|
49 |
# Particionar datos
|
50 |
+
text_splitter = TokenTextSplitter(
|
51 |
chunk_size=1024,
|
52 |
chunk_overlap=200
|
53 |
)
|