Hi Hugging Face team and community,
I love HuggingFace Community so much, but I’m worried that some publicly deployed models (text‑to‑image, chat, etc.) can generate NSFW content. It would be very helpful to have a simple, optional NSFW‑filter switch for Spaces built with Gradio or Streamlit.
Proposed features
-
Config flag – e.g.,
filter_nsfw=True
in the Space’sREADME
orapp.py.
-
Automatic detection – use the existing HF NSFW detection pipelines to block or blur unsafe outputs and replace them with a safe placeholder (e.g., “Content hidden for safety”).
-
UI indication – show a “Safe‑for‑Work” badge when the filter is active, so users know the demo respects content safety.
-
Staff assistance – if a Space repeatedly produces adult content, staff could automatically enable the filter and notify the author.
Making this an opt‑in toggle gives authors flexibility (they can disable it for research) while protecting end‑users from accidental exposure.
Would love to hear thoughts on adding this to the next release of the Spaces templates or the Gradio/Streamlit integrations.
Thanks!