Spaces:
Sleeping
Sleeping
Chananchida
commited on
Commit
•
c17251d
1
Parent(s):
d5bb18b
Update app.py
Browse files
app.py
CHANGED
@@ -136,7 +136,7 @@ class Chatbot:
|
|
136 |
question_vector = self.get_embeddings(message)
|
137 |
question_vector = self.prepare_sentences_vector([question_vector])
|
138 |
similar_questions, similar_contexts, distances, indices = self.faiss_search(question_vector)
|
139 |
-
Answer = self.model_pipeline(message, similar_contexts)
|
140 |
start_index = similar_contexts.find(Answer)
|
141 |
end_index = start_index + len(Answer)
|
142 |
output = {
|
|
|
136 |
question_vector = self.get_embeddings(message)
|
137 |
question_vector = self.prepare_sentences_vector([question_vector])
|
138 |
similar_questions, similar_contexts, distances, indices = self.faiss_search(question_vector)
|
139 |
+
Answer = self.model_pipeline(str(message), similar_contexts[0])
|
140 |
start_index = similar_contexts.find(Answer)
|
141 |
end_index = start_index + len(Answer)
|
142 |
output = {
|