Chris4K commited on
Commit
ce55f3d
·
verified ·
1 Parent(s): b3030b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -102,11 +102,11 @@ def calculate_statistics(embeddings):
102
  import shutil
103
  def upload_file(file, model_name, split_strategy, chunk_size, overlap_size, max_tokens, query, top_k):
104
  # Create the full destination file path
105
- file_path = os.path.join(FILES_DIR, file.name)
106
 
107
  # Write the uploaded file content to the file path
108
- with open(file_path, "wb") as f:
109
- f.write(file.read()) # Read and write the file content
110
 
111
  # Process files and get embeddings
112
  embeddings, chunks = process_files(model_name, split_strategy, chunk_size, overlap_size, max_tokens)
 
102
  import shutil
103
  def upload_file(file, model_name, split_strategy, chunk_size, overlap_size, max_tokens, query, top_k):
104
  # Create the full destination file path
105
+ #file_path = os.path.join(FILES_DIR, file.name)
106
 
107
  # Write the uploaded file content to the file path
108
+ #with open(file_path, "wb") as f:
109
+ # f.write(file.read()) # Read and write the file content
110
 
111
  # Process files and get embeddings
112
  embeddings, chunks = process_files(model_name, split_strategy, chunk_size, overlap_size, max_tokens)