Chris4K commited on
Commit
0351ee1
·
verified ·
1 Parent(s): 8e36aef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -108,7 +108,9 @@ def upload_file(file, model_name, split_strategy, chunk_size, overlap_size, max_
108
  # Write the file using file.read() instead of file.value
109
  #with open(os.path.join(FILES_DIR, file.name), "wb") as f:
110
  # f.write(data) # Use .read() to get the file content
111
- shutil.copyfile(file.name, FILES_DIR)
 
 
112
 
113
  # Process files and get embeddings
114
  embeddings, chunks = process_files(model_name, split_strategy, chunk_size, overlap_size, max_tokens)
 
108
  # Write the file using file.read() instead of file.value
109
  #with open(os.path.join(FILES_DIR, file.name), "wb") as f:
110
  # f.write(data) # Use .read() to get the file content
111
+ file_path = os.path.join(FILES_DIR, file.name)
112
+
113
+ shutil.copyfile(file.name, file_path)
114
 
115
  # Process files and get embeddings
116
  embeddings, chunks = process_files(model_name, split_strategy, chunk_size, overlap_size, max_tokens)