jenngang commited on
Commit
ff7dfce
·
verified ·
1 Parent(s): bc9f732

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +12 -7
app.py CHANGED
@@ -699,15 +699,20 @@ 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 = f"""
703
- Context: {context}
704
- Current customer query: {query}
705
- Provide a helpful response that takes into account any relevant past interactions.
706
- """
707
- print("Prepare for invoke...")
 
 
 
 
 
708
 
709
  # Generate a response using the agent
710
- response = self.agent_executor.invoke({"input": prompt})
711
  st.write("Got response...")
712
 
713
  # 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
 
714
  # Generate a response using the agent
715
+ response = self.agent_executor.invoke({"input": prompt_str})
716
  st.write("Got response...")
717
 
718
  # Store the current interaction for future reference