realrastayouth commited on
Commit
aec45ab
1 Parent(s): e0086e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -7,15 +7,11 @@ from sentence_transformers import SentenceTransformer
7
  #load the sentences data
8
  sentences_df = pd.read_pickle("./sentences_data.pkl")
9
 
10
-
11
- #load the model
12
- model_name_or_path="semantic_search_model"
13
- model = SentenceTransformer(model_name_or_path)
14
-
15
  #load the index
16
  index = faiss.read_index("semantic_search_vector.index")
17
 
18
  def question_answer(query):
 
19
  k = 4
20
  xq = model.encode([query])
21
  D, I = index.search(xq, k) # search
 
7
  #load the sentences data
8
  sentences_df = pd.read_pickle("./sentences_data.pkl")
9
 
 
 
 
 
 
10
  #load the index
11
  index = faiss.read_index("semantic_search_vector.index")
12
 
13
  def question_answer(query):
14
+ model = SentenceTransformer('bert-base-nli-mean-tokens')
15
  k = 4
16
  xq = model.encode([query])
17
  D, I = index.search(xq, k) # search