Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,12 +10,9 @@ from langchain_google_genai import ChatGoogleGenerativeAI
|
|
10 |
import os
|
11 |
|
12 |
# Set up the directories for data and vector DB
|
13 |
-
DATA_DIR = "
|
14 |
-
DB_DIR = "
|
15 |
|
16 |
-
# Create directories if they don't exist
|
17 |
-
os.makedirs(DATA_DIR, exist_ok=True)
|
18 |
-
os.makedirs(DB_DIR, exist_ok=True)
|
19 |
|
20 |
# Initialize the embeddings model
|
21 |
embeddings_model = SentenceTransformerEmbeddings(model_name="all-MiniLM-L6-v2")
|
@@ -34,7 +31,7 @@ def load_data():
|
|
34 |
return vectorstore
|
35 |
|
36 |
# Set up the generative AI model
|
37 |
-
llm = ChatGoogleGenerativeAI(model="gemini-1.5-pro", google_api_key="
|
38 |
|
39 |
# Load vector store
|
40 |
vectorstore = load_data()
|
|
|
10 |
import os
|
11 |
|
12 |
# Set up the directories for data and vector DB
|
13 |
+
DATA_DIR = "MyData"
|
14 |
+
DB_DIR = "VectorDB"
|
15 |
|
|
|
|
|
|
|
16 |
|
17 |
# Initialize the embeddings model
|
18 |
embeddings_model = SentenceTransformerEmbeddings(model_name="all-MiniLM-L6-v2")
|
|
|
31 |
return vectorstore
|
32 |
|
33 |
# Set up the generative AI model
|
34 |
+
llm = ChatGoogleGenerativeAI(model="gemini-1.5-pro", google_api_key="AIzaSyAnsIVS4x_7lJLe9AYXGLV8FRwUTQkB-1w")
|
35 |
|
36 |
# Load vector store
|
37 |
vectorstore = load_data()
|