jenngang commited on
Commit
b7d48d7
·
verified ·
1 Parent(s): da826be

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +8 -7
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": prompt_str})
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