shivanis14
commited on
Commit
•
bb0ec55
1
Parent(s):
678e3c2
Update app.py
Browse files
app.py
CHANGED
@@ -259,7 +259,7 @@ def initialize_assistants_and_vector_stores():
|
|
259 |
)
|
260 |
|
261 |
embeddings_titles = []
|
262 |
-
if os.path.exists('embeddings.pkl'):
|
263 |
#Find embeddings of titles from titles.txt
|
264 |
titles = []
|
265 |
#if embedding_titles.pkl is absent
|
@@ -278,7 +278,7 @@ def initialize_assistants_and_vector_stores():
|
|
278 |
pickle.dump(data, f)
|
279 |
|
280 |
else:
|
281 |
-
|
282 |
# Load both sentences and embeddings
|
283 |
with open('embeddings.pkl', 'rb') as f:
|
284 |
loaded_data = pickle.load(f)
|
|
|
259 |
)
|
260 |
|
261 |
embeddings_titles = []
|
262 |
+
if not os.path.exists('embeddings.pkl'):
|
263 |
#Find embeddings of titles from titles.txt
|
264 |
titles = []
|
265 |
#if embedding_titles.pkl is absent
|
|
|
278 |
pickle.dump(data, f)
|
279 |
|
280 |
else:
|
281 |
+
print("Reading embeddings.pkl")
|
282 |
# Load both sentences and embeddings
|
283 |
with open('embeddings.pkl', 'rb') as f:
|
284 |
loaded_data = pickle.load(f)
|