Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -103,17 +103,7 @@ def generate_response(prompt):
|
|
103 |
response = mdl.call_conversational_rag(prompt,final_chain)
|
104 |
return response['answer']
|
105 |
|
106 |
-
|
107 |
-
def get_response(self, user_query):
|
108 |
-
db=self.create_vectorstore(documents)
|
109 |
-
docs = db.similarity_search(user_query)
|
110 |
-
most_similar_question = docs[0].page_content.split("\n")[0] # Extract the first question
|
111 |
-
if user_query==most_similar_question:
|
112 |
-
most_similar_question=docs[1].page_content.split("\n")[0]
|
113 |
-
|
114 |
-
print(most_similar_question)
|
115 |
-
return most_similar_question
|
116 |
-
|
117 |
## Applying the user input box
|
118 |
with input_container:
|
119 |
# Add a radio button to choose input mode
|
|
|
103 |
response = mdl.call_conversational_rag(prompt,final_chain)
|
104 |
return response['answer']
|
105 |
|
106 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
## Applying the user input box
|
108 |
with input_container:
|
109 |
# Add a radio button to choose input mode
|