Chris4K commited on
Commit
46d748c
·
verified ·
1 Parent(s): 15b9e99

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -102,7 +102,7 @@ def calculate_statistics(embeddings):
102
  # Gradio frontend
103
  def upload_file(file, model_name, split_strategy, chunk_size, overlap_size, max_tokens, query, top_k):
104
  with open(os.path.join(FILES_DIR, file.name), "wb") as f:
105
- f.write(file.read())
106
 
107
  # Process files and get embeddings
108
  embeddings, chunks = process_files(model_name, split_strategy, chunk_size, overlap_size, max_tokens)
 
102
  # Gradio frontend
103
  def upload_file(file, model_name, split_strategy, chunk_size, overlap_size, max_tokens, query, top_k):
104
  with open(os.path.join(FILES_DIR, file.name), "wb") as f:
105
+ f.write(file.value)
106
 
107
  # Process files and get embeddings
108
  embeddings, chunks = process_files(model_name, split_strategy, chunk_size, overlap_size, max_tokens)