LalitMahale
commited on
Commit
·
f631f81
1
Parent(s):
5916e02
''
Browse files
main.py
CHANGED
@@ -7,22 +7,22 @@ import os
|
|
7 |
|
8 |
|
9 |
|
10 |
-
def dump_user_question(query):
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
|
24 |
def process(user_query:str):
|
25 |
-
dump_user_question(user_query)
|
26 |
user_embedding = GetEmbedding([user_query]).user_query_emb()
|
27 |
with open(r"data\question_embedding_latest.pkl","rb") as f:
|
28 |
load_embedding = pickle.load(f)
|
|
|
7 |
|
8 |
|
9 |
|
10 |
+
# def dump_user_question(query):
|
11 |
+
# try:
|
12 |
+
# if os.path.exists:
|
13 |
+
# with open(r"data\question_data.pkl","rb") as f:
|
14 |
+
# que = pickle.load(f)
|
15 |
+
# else:
|
16 |
+
# que = []
|
17 |
+
# que.append(query)
|
18 |
+
# with open(r"data\question_data.pkl","wb") as f:
|
19 |
+
# que = pickle.dump(que,f)
|
20 |
+
# except:
|
21 |
+
# with open(r"data\question_data.pkl","wb") as f:
|
22 |
+
# pickle.dump([],f)
|
23 |
|
24 |
def process(user_query:str):
|
25 |
+
# dump_user_question(user_query)
|
26 |
user_embedding = GetEmbedding([user_query]).user_query_emb()
|
27 |
with open(r"data\question_embedding_latest.pkl","rb") as f:
|
28 |
load_embedding = pickle.load(f)
|