Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
@@ -692,7 +692,7 @@ class NutritionBot:
|
|
692 |
return self.memory.search(
|
693 |
query=query, # Search for interactions related to the query
|
694 |
user_id=user_id, # Restrict search to the specific user
|
695 |
-
limit=
|
696 |
)
|
697 |
|
698 |
|
@@ -813,7 +813,8 @@ def nutrition_disorder_streamlit():
|
|
813 |
|
814 |
try:
|
815 |
if 'chatbot' not in st.session_state:
|
816 |
-
st.session_state.chatbot = __________() # Blank #6: Fill in with the chatbot class initialization (e.g., NutritionBot)
|
|
|
817 |
#response = st.session_state.chatbot.__________(st.session_state.user_id, user_query)
|
818 |
response = st.session_state.chatbot.handle_customer_query(st.session_state.user_id, user_query)
|
819 |
# Blank #7: Fill in with the method to handle queries (e.g., handle_customer_query)
|
|
|
692 |
return self.memory.search(
|
693 |
query=query, # Search for interactions related to the query
|
694 |
user_id=user_id, # Restrict search to the specific user
|
695 |
+
limit= 3 # Complete the code to define the limit for retrieved interactions
|
696 |
)
|
697 |
|
698 |
|
|
|
813 |
|
814 |
try:
|
815 |
if 'chatbot' not in st.session_state:
|
816 |
+
#st.session_state.chatbot = __________() # Blank #6: Fill in with the chatbot class initialization (e.g., NutritionBot)
|
817 |
+
st.session_state.chatbot = NutritionBot()
|
818 |
#response = st.session_state.chatbot.__________(st.session_state.user_id, user_query)
|
819 |
response = st.session_state.chatbot.handle_customer_query(st.session_state.user_id, user_query)
|
820 |
# Blank #7: Fill in with the method to handle queries (e.g., handle_customer_query)
|