mgokg commited on
Commit
c988a88
·
verified ·
1 Parent(s): bcc30d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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=1000, # Adjust the chunk size as needed
86
- chunk_overlap=100 # Adjust the overlap as needed
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=3
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