aasiavakil commited on
Commit
da295c4
·
verified ·
1 Parent(s): d7eb366

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -38,17 +38,19 @@ def find_clinic_by_county(county_name, file_path="info.txt"):
38
  return "\n\n".join(clinics)
39
  # Chatbot logic
40
  def chatbot(message, history):
 
 
 
 
 
 
 
41
  message = message.strip().lower()
42
  # Check for program keywords in message
43
  for key in program_explanations:
44
  if key in message:
45
  return program_explanations[key] + "\n\nAnything else you'd like help with?"
46
 
47
- program_explanations = {
48
- "medicaid": "Medicaid (called Apple Health in Washington) is a free or low-cost health coverage program for eligible low-income adults, children, pregnant women, and people with disabilities.",
49
- "medicare": "Medicare is a federal health insurance program mainly for people age 65 or older and certain younger people with disabilities.",
50
- "aca": "ACA subsidies are financial help from the Affordable Care Act that reduce your monthly insurance premium based on your income.",
51
- }
52
 
53
  # EXPLANATION TRIGGER FIX
54
  if any(phrase in message for phrase in ["what does that mean", "what's that", "explain", "what is that"]):
 
38
  return "\n\n".join(clinics)
39
  # Chatbot logic
40
  def chatbot(message, history):
41
+
42
+ program_explanations = {
43
+ "medicaid": "Medicaid (called Apple Health in Washington) is a free or low-cost health coverage program for eligible low-income adults, children, pregnant women, and people with disabilities.",
44
+ "medicare": "Medicare is a federal health insurance program mainly for people age 65 or older and certain younger people with disabilities.",
45
+ "aca": "ACA subsidies are financial help from the Affordable Care Act that reduce your monthly insurance premium based on your income.",
46
+ }
47
+
48
  message = message.strip().lower()
49
  # Check for program keywords in message
50
  for key in program_explanations:
51
  if key in message:
52
  return program_explanations[key] + "\n\nAnything else you'd like help with?"
53
 
 
 
 
 
 
54
 
55
  # EXPLANATION TRIGGER FIX
56
  if any(phrase in message for phrase in ["what does that mean", "what's that", "explain", "what is that"]):