Chris4K commited on
Commit
5453b4c
·
verified ·
1 Parent(s): 42cae1e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -126,9 +126,7 @@ def upload_file(file, model_name, split_strategy, overlap_size,chunk_size, max_
126
  except ValueError:
127
  return {"error": "Chunk size and overlap size must be valid integers."}
128
 
129
- print('chunk size: '+chunk_size)
130
- print('ov size: '+overlap_size)
131
-
132
  # Handle file upload using Gradio file object
133
  file_path = file.name # Get the file path from Gradio file object
134
 
@@ -137,7 +135,7 @@ def upload_file(file, model_name, split_strategy, overlap_size,chunk_size, max_
137
  shutil.copyfile(file_path, destination_path) # Use shutil to copy the file
138
 
139
  # Process files and get embeddings
140
- embeddings, chunks = process_files(model_name, split_strategy, 120, 0, max_tokens)
141
 
142
  # Perform search
143
  results = search_embeddings(query, model_name, top_k)
 
126
  except ValueError:
127
  return {"error": "Chunk size and overlap size must be valid integers."}
128
 
129
+
 
 
130
  # Handle file upload using Gradio file object
131
  file_path = file.name # Get the file path from Gradio file object
132
 
 
135
  shutil.copyfile(file_path, destination_path) # Use shutil to copy the file
136
 
137
  # Process files and get embeddings
138
+ embeddings, chunks = process_files(model_name, split_strategy, chunk_size, overlap_size, max_tokens)
139
 
140
  # Perform search
141
  results = search_embeddings(query, model_name, top_k)