Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -136,8 +136,8 @@ def run_chain(user_query):
|
|
136 |
print("Your query:\n"+user_query)
|
137 |
vector_db_from_index = Pinecone.from_existing_index(index_name, hf_embeddings, namespace=namespace)
|
138 |
ss_results = vector_db_from_index.similarity_search(query=user_query, namespace=namespace, k=5)
|
139 |
-
|
140 |
-
initial_ai_response=chain({"
|
141 |
temp_ai_response = initial_ai_response.partition('<|end|>')[0]
|
142 |
final_ai_response = temp_ai_response.replace('\n', '')
|
143 |
print(final_ai_response)
|
|
|
136 |
print("Your query:\n"+user_query)
|
137 |
vector_db_from_index = Pinecone.from_existing_index(index_name, hf_embeddings, namespace=namespace)
|
138 |
ss_results = vector_db_from_index.similarity_search(query=user_query, namespace=namespace, k=5)
|
139 |
+
initial_ai_response = chain.run(input_documents=ss_results, question=user_query, return_only_outputs=True)
|
140 |
+
#initial_ai_response=chain({"input_documents": ss_results, "question": user_query}, return_only_outputs=True)
|
141 |
temp_ai_response = initial_ai_response.partition('<|end|>')[0]
|
142 |
final_ai_response = temp_ai_response.replace('\n', '')
|
143 |
print(final_ai_response)
|