Ichlibitiche commited on
Commit
c53ef9f
·
verified ·
1 Parent(s): 5493bd3

FloraDB tab: "ASPCA lists as non-toxic" filters; names checked against GBIF

Browse files

The pet filters "Verified safe for dogs/cats" select the plants the ASPCA lists as
non-toxic (aspca_verified, flag 0; a genus inference never sets a 0), so they are named
that way. "GBIF-verified names" becomes "names checked against GBIF", as on the FloraDB
site since FloraaDB/houseplants-botanical-floradb#26. Filter results are unchanged.

Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -92,8 +92,8 @@ F_COLS = {
92
  }
93
  F_PET_FILTERS = [
94
  "All",
95
- "Verified safe for dogs",
96
- "Verified safe for cats",
97
  "Toxic to dogs or cats",
98
  "Toxicity unknown",
99
  ]
@@ -114,9 +114,9 @@ def f_explore(name_query, family, light, confidence, pet_filter):
114
  if confidence != "All":
115
  d = d[d["care_confidence"] == confidence]
116
  # Safety filters are conservative: "safe" requires a determined status, never unknown
117
- if pet_filter == "Verified safe for dogs":
118
  d = d[(d["is_toxic_to_dogs"] == 0) & (d["toxicity_status"] != "unknown")]
119
- elif pet_filter == "Verified safe for cats":
120
  d = d[(d["is_toxic_to_cats"] == 0) & (d["toxicity_status"] != "unknown")]
121
  elif pet_filter == "Toxic to dogs or cats":
122
  d = d[(d["is_toxic_to_dogs"] == 1) | (d["is_toxic_to_cats"] == 1)]
@@ -228,7 +228,7 @@ with gr.Blocks(title="Dataset Sample Explorers") as demo:
228
  demo.load(fn=r_explore, inputs=r_inputs, outputs=[r_text, r_table])
229
 
230
  with gr.Tab("🌿 FloraDB — Houseplants & Pet Toxicity"):
231
- gr.Markdown(f"""**{len(f_df)} houseplants from {f_df['family'].nunique()} botanical families** — care as **quantitative metrics** (Lux, watering days, °C) with **ASPCA pet toxicity** on GBIF-verified names. Full dataset: **270 care plants + 891 toxicity records + 20,000+ species index** — [floradb.dataengineered.io](https://floradb.dataengineered.io) · [🤗 sample dataset](https://huggingface.co/datasets/Ichlibitiche/floradb-houseplants-care-sample) · [🏆 Kaggle](https://www.kaggle.com/datasets/dataengineered/floradb-houseplants-care-sample) · [🔄 Apify lookup](https://apify.com/dataengineered/houseplant-care-toxicity-lookup)""")
232
  with gr.Row():
233
  f_name = gr.Textbox(label="Plant Search", placeholder="e.g. Monstera, Pothos, Ficus...")
234
  f_family = gr.Dropdown(choices=choices(f_df, "family"), value="All", label="Botanical Family")
 
92
  }
93
  F_PET_FILTERS = [
94
  "All",
95
+ "ASPCA lists as non-toxic to dogs",
96
+ "ASPCA lists as non-toxic to cats",
97
  "Toxic to dogs or cats",
98
  "Toxicity unknown",
99
  ]
 
114
  if confidence != "All":
115
  d = d[d["care_confidence"] == confidence]
116
  # Safety filters are conservative: "safe" requires a determined status, never unknown
117
+ if pet_filter == "ASPCA lists as non-toxic to dogs":
118
  d = d[(d["is_toxic_to_dogs"] == 0) & (d["toxicity_status"] != "unknown")]
119
+ elif pet_filter == "ASPCA lists as non-toxic to cats":
120
  d = d[(d["is_toxic_to_cats"] == 0) & (d["toxicity_status"] != "unknown")]
121
  elif pet_filter == "Toxic to dogs or cats":
122
  d = d[(d["is_toxic_to_dogs"] == 1) | (d["is_toxic_to_cats"] == 1)]
 
228
  demo.load(fn=r_explore, inputs=r_inputs, outputs=[r_text, r_table])
229
 
230
  with gr.Tab("🌿 FloraDB — Houseplants & Pet Toxicity"):
231
+ gr.Markdown(f"""**{len(f_df)} houseplants from {f_df['family'].nunique()} botanical families** — care as **quantitative metrics** (Lux, watering days, °C) with **ASPCA pet toxicity** on names checked against GBIF. Full dataset: **270 care plants + 891 toxicity records + 20,000+ species index** — [floradb.dataengineered.io](https://floradb.dataengineered.io) · [🤗 sample dataset](https://huggingface.co/datasets/Ichlibitiche/floradb-houseplants-care-sample) · [🏆 Kaggle](https://www.kaggle.com/datasets/dataengineered/floradb-houseplants-care-sample) · [🔄 Apify lookup](https://apify.com/dataengineered/houseplant-care-toxicity-lookup)""")
232
  with gr.Row():
233
  f_name = gr.Textbox(label="Plant Search", placeholder="e.g. Monstera, Pothos, Ficus...")
234
  f_family = gr.Dropdown(choices=choices(f_df, "family"), value="All", label="Botanical Family")