Spaces:
Running
Running
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
@@ -699,20 +699,21 @@ class NutritionBot:
|
|
699 |
|
700 |
# Prepare a prompt combining past context and the current query
|
701 |
#prompt = f"""Context: {context}; Current customer query: {query}; Provide a helpful response that takes into account any relevant past interactions."""
|
702 |
-
prompt_str = f""" \
|
703 |
-
Context: {context} \
|
704 |
-
Current customer query: {query} \
|
705 |
-
Provide a helpful response that takes into account any relevant past interactions. \
|
706 |
-
"""
|
707 |
#prompt = f"""
|
708 |
#Context: {context}
|
709 |
#Current customer query: {query}
|
710 |
#Provide a helpful response that takes into account any relevant past interactions.
|
711 |
#"""
|
712 |
-
print(f"Prepare for invoke...{prompt_str}")
|
|
|
713 |
|
714 |
# Generate a response using the agent
|
715 |
-
response = self.agent_executor.invoke({"input":
|
716 |
st.write("Got response...")
|
717 |
|
718 |
# Store the current interaction for future reference
|
|
|
699 |
|
700 |
# Prepare a prompt combining past context and the current query
|
701 |
#prompt = f"""Context: {context}; Current customer query: {query}; Provide a helpful response that takes into account any relevant past interactions."""
|
702 |
+
#prompt_str = f""" \
|
703 |
+
#Context: {context} \
|
704 |
+
#Current customer query: {query} \
|
705 |
+
#Provide a helpful response that takes into account any relevant past interactions. \
|
706 |
+
#"""
|
707 |
#prompt = f"""
|
708 |
#Context: {context}
|
709 |
#Current customer query: {query}
|
710 |
#Provide a helpful response that takes into account any relevant past interactions.
|
711 |
#"""
|
712 |
+
#print(f"Prepare for invoke...{prompt_str}")
|
713 |
+
print(f"Prepare for invoke...{context}")
|
714 |
|
715 |
# Generate a response using the agent
|
716 |
+
response = self.agent_executor.invoke({"input": context})
|
717 |
st.write("Got response...")
|
718 |
|
719 |
# Store the current interaction for future reference
|