Update app.py
Browse files
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.
|
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)
|