Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -21,8 +21,7 @@ import torch
|
|
21 |
import tqdm
|
22 |
import accelerate
|
23 |
import re
|
24 |
-
|
25 |
-
from chromadb.utils import get_default_config
|
26 |
|
27 |
# default_persist_directory = './chroma_HF/'
|
28 |
list_llm = ["mistralai/Mistral-7B-Instruct-v0.2", "mistralai/Mixtral-8x7B-Instruct-v0.1", "mistralai/Mistral-7B-Instruct-v0.1", \
|
@@ -211,10 +210,8 @@ def create_collection_name(filepath):
|
|
211 |
def initialize_database(list_file_obj, chunk_size, chunk_overlap, progress=gr.Progress()):
|
212 |
# Check if a database already exists
|
213 |
try:
|
214 |
-
# Get the current configuration
|
215 |
-
config = get_default_config()
|
216 |
# Delete the existing database
|
217 |
-
chromadb.delete(
|
218 |
print("Existing database deleted successfully.")
|
219 |
except Exception as e:
|
220 |
print(f"Error deleting existing database: {str(e)}")
|
|
|
21 |
import tqdm
|
22 |
import accelerate
|
23 |
import re
|
24 |
+
# from chromadb.utils import get_default_config
|
|
|
25 |
|
26 |
# default_persist_directory = './chroma_HF/'
|
27 |
list_llm = ["mistralai/Mistral-7B-Instruct-v0.2", "mistralai/Mixtral-8x7B-Instruct-v0.1", "mistralai/Mistral-7B-Instruct-v0.1", \
|
|
|
210 |
def initialize_database(list_file_obj, chunk_size, chunk_overlap, progress=gr.Progress()):
|
211 |
# Check if a database already exists
|
212 |
try:
|
|
|
|
|
213 |
# Delete the existing database
|
214 |
+
chromadb.delete()
|
215 |
print("Existing database deleted successfully.")
|
216 |
except Exception as e:
|
217 |
print(f"Error deleting existing database: {str(e)}")
|