Update app.py
Browse files
app.py
CHANGED
@@ -97,13 +97,12 @@ def get_rag_results(prompt):
|
|
97 |
)
|
98 |
|
99 |
response, additional_metadata = clean_pinecone(response)
|
100 |
-
print("Here is the pinecone response:", response)
|
101 |
if len(response) < 1:
|
102 |
response = "No classes were found that matched your criteria"
|
103 |
additional_metadata = "None"
|
104 |
else:
|
105 |
response = reranker(query, response) # BERT cross encoder for ranking
|
106 |
-
print("##Here is the response from the reranker", response)
|
107 |
|
108 |
|
109 |
return response, additional_metadata
|
@@ -136,6 +135,7 @@ if prompt := st.chat_input("What kind of class are you looking for?"):
|
|
136 |
rag_response, additional_metadata = get_rag_results(prompt)
|
137 |
rag_response = " ".join([message for message in rag_response])
|
138 |
st.session_state.rag_responses.append(rag_response)
|
|
|
139 |
all_rag_responses = " ".join([response for response in st.session_state.rag_responses])
|
140 |
result_query = 'Original Query:' + prompt
|
141 |
# '\n Additional Class Times:' + str(additional_metadata)
|
|
|
97 |
)
|
98 |
|
99 |
response, additional_metadata = clean_pinecone(response)
|
|
|
100 |
if len(response) < 1:
|
101 |
response = "No classes were found that matched your criteria"
|
102 |
additional_metadata = "None"
|
103 |
else:
|
104 |
response = reranker(query, response) # BERT cross encoder for ranking
|
105 |
+
print("## Here is the response from the reranker", response)
|
106 |
|
107 |
|
108 |
return response, additional_metadata
|
|
|
135 |
rag_response, additional_metadata = get_rag_results(prompt)
|
136 |
rag_response = " ".join([message for message in rag_response])
|
137 |
st.session_state.rag_responses.append(rag_response)
|
138 |
+
print("Here is the session state responses", st.session_state.rag_responses)
|
139 |
all_rag_responses = " ".join([response for response in st.session_state.rag_responses])
|
140 |
result_query = 'Original Query:' + prompt
|
141 |
# '\n Additional Class Times:' + str(additional_metadata)
|