isayahc commited on
Commit
c4ca36a
Β·
1 Parent(s): 6ca9efb

imported needed imports

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -18,7 +18,7 @@ from langchain.chains import RetrievalQA
18
 
19
  from langchain.prompts import ChatPromptTemplate
20
 
21
- from utils import download_from_google_drive
22
 
23
  from dotenv import load_dotenv
24
 
@@ -41,10 +41,13 @@ print(file_id)
41
  # file_id = os.getenv(gdown_file_id) # Replace with your file ID
42
  download_from_google_drive(file_id)
43
  zip_file_path = "/content/chroma_db-complete.zip" # Replace with your zip file path
44
- extract_path = "/chroma_db"
 
 
 
45
  unzip_file(zip_file_path,extract_path)
46
 
47
- db = Chroma(persist_directory="./chroma_db", embedding_function=embeddings)
48
  db.get()
49
  #texts = text_splitter.split_documents(documents)
50
  #db = Chroma.from_documents(texts, embedding_function=embeddings)
 
18
 
19
  from langchain.prompts import ChatPromptTemplate
20
 
21
+ from utils import download_from_google_drive, unzip_file
22
 
23
  from dotenv import load_dotenv
24
 
 
41
  # file_id = os.getenv(gdown_file_id) # Replace with your file ID
42
  download_from_google_drive(file_id)
43
  zip_file_path = "/content/chroma_db-complete.zip" # Replace with your zip file path
44
+ extract_path = "/gdown_chroma_db"
45
+
46
+ embedding_db_location = "/gdown_chroma_db"
47
+
48
  unzip_file(zip_file_path,extract_path)
49
 
50
+ db = Chroma(persist_directory=embedding_db_location, embedding_function=embeddings)
51
  db.get()
52
  #texts = text_splitter.split_documents(documents)
53
  #db = Chroma.from_documents(texts, embedding_function=embeddings)