HindHammad commited on
Commit
66518ca
·
verified ·
1 Parent(s): cde5cd2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -115,7 +115,7 @@ def is_high_risk_question(question: str) -> bool:
115
  # we wrote it to be kind but firm about nutribud’s limits and to redirect users to real professionals
116
  def safety_response(question: str) -> str:
117
  return (
118
- "i’m nutribud, a general nutrition helper based on public health guidelines. "
119
  "i can’t give medical advice, personalized meal plans, or recommendations for specific "
120
  "conditions like diabetes, dizziness with fasting, or rapid weight loss. "
121
  "it’s really important to talk to a doctor or a registered dietitian for guidance "
@@ -132,7 +132,7 @@ def build_rag_answer(question: str) -> str:
132
 
133
  if not contexts:
134
  return (
135
- "right now, nutribud doesn’t have any nutrition documents loaded.\n\n"
136
  "on the backend, we look up answers inside .txt files stored in the data folder of this space. "
137
  "to enable full answers, please add trusted nutrition documents there and restart the app."
138
  )
@@ -171,7 +171,7 @@ def nutri_chat(message: str, history: list) -> str:
171
  # our earlier attempts to style themes directly caused version errors, so we keep it simple here
172
  demo = gr.ChatInterface(
173
  fn=nutri_chat,
174
- title="🌿 nutribud — friendly nutrition rag chatbot",
175
  description=(
176
  "ask nutribud general questions about healthy eating and it will answer using trusted public health documents.\n"
177
  "nutribud does not give medical advice or personalized meal plans.\n\n"
 
115
  # we wrote it to be kind but firm about nutribud’s limits and to redirect users to real professionals
116
  def safety_response(question: str) -> str:
117
  return (
118
+ "i’m NutriBud, a general nutrition helper based on public health guidelines. "
119
  "i can’t give medical advice, personalized meal plans, or recommendations for specific "
120
  "conditions like diabetes, dizziness with fasting, or rapid weight loss. "
121
  "it’s really important to talk to a doctor or a registered dietitian for guidance "
 
132
 
133
  if not contexts:
134
  return (
135
+ "right now, NutriBud doesn’t have any nutrition documents loaded.\n\n"
136
  "on the backend, we look up answers inside .txt files stored in the data folder of this space. "
137
  "to enable full answers, please add trusted nutrition documents there and restart the app."
138
  )
 
171
  # our earlier attempts to style themes directly caused version errors, so we keep it simple here
172
  demo = gr.ChatInterface(
173
  fn=nutri_chat,
174
+ title="🌿 NutriBud — friendly nutrition rag chatbot 🌿",
175
  description=(
176
  "ask nutribud general questions about healthy eating and it will answer using trusted public health documents.\n"
177
  "nutribud does not give medical advice or personalized meal plans.\n\n"