Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -82,8 +82,8 @@ def process_pdf(file):
|
|
82 |
|
83 |
# Split the text into smaller chunks
|
84 |
text_splitter = RecursiveCharacterTextSplitter(
|
85 |
-
chunk_size=
|
86 |
-
chunk_overlap=
|
87 |
)
|
88 |
chunks = text_splitter.split_text(text)
|
89 |
|
@@ -106,7 +106,7 @@ def search_similar_documents(prompt):
|
|
106 |
# Führe die Ähnlichkeitssuche durch
|
107 |
results = collection.query(
|
108 |
query_embeddings=[query_embedding],
|
109 |
-
n_results=
|
110 |
)
|
111 |
|
112 |
# Formatiere die Ergebnisse
|
|
|
82 |
|
83 |
# Split the text into smaller chunks
|
84 |
text_splitter = RecursiveCharacterTextSplitter(
|
85 |
+
chunk_size=300, # Adjust the chunk size as needed
|
86 |
+
chunk_overlap=10 # Adjust the overlap as needed
|
87 |
)
|
88 |
chunks = text_splitter.split_text(text)
|
89 |
|
|
|
106 |
# Führe die Ähnlichkeitssuche durch
|
107 |
results = collection.query(
|
108 |
query_embeddings=[query_embedding],
|
109 |
+
n_results=50
|
110 |
)
|
111 |
|
112 |
# Formatiere die Ergebnisse
|