Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
@@ -704,7 +704,7 @@ def nutrition_disorder_streamlit():
|
|
704 |
filtered_result = filtered_result.replace("\n", " ") # Normalize the result
|
705 |
|
706 |
# Check if input is safe based on allowed statuses
|
707 |
-
if filtered_result in ["SAFE", "UNSAFE S7", "UNSAFE S6"]:
|
708 |
try:
|
709 |
if 'chatbot' not in st.session_state:
|
710 |
st.session_state.chatbot = NutritionBot()
|
|
|
704 |
filtered_result = filtered_result.replace("\n", " ") # Normalize the result
|
705 |
|
706 |
# Check if input is safe based on allowed statuses
|
707 |
+
if filtered_result in ["safe", "SAFE", "UNSAFE S7", "UNSAFE S6"]:
|
708 |
try:
|
709 |
if 'chatbot' not in st.session_state:
|
710 |
st.session_state.chatbot = NutritionBot()
|