Spaces:
Runtime error
Runtime error
File size: 9,180 Bytes
d60ed1f a389c4e d60ed1f 1e0df6e d60ed1f c7bea8f d60ed1f 0ec2085 2c90032 d60ed1f 1e0df6e d60ed1f 2c90032 d60ed1f 1e0df6e d60ed1f 2c90032 d60ed1f 1e0df6e d60ed1f 2c90032 f1ab130 2c90032 d60ed1f 1e0df6e d60ed1f 2c90032 d60ed1f 1e0df6e d60ed1f 99ab21c 2c90032 d60ed1f 925be49 d60ed1f f1ab130 d60ed1f fadf846 d60ed1f ac476f1 0ec2085 9950333 d60ed1f 7fc9d23 d60ed1f c9e090a d60ed1f f1ab130 d60ed1f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
import gradio as gr
import os
hf_writer = gr.HuggingFaceDatasetSaver(
os.getenv('HUGGING_FACE_HUB_TOKEN'),
organization="society-ethics",
dataset_name="featured-spaces-submissions",
private=True
)
principles = [
{
"title": "π€ Consentful",
"content": """
[What is consentful tech?](https://www.consentfultech.io)
Consentful technology supports the self-determination of people who use and are affected by these technologies.
For Spaces, some examples of this can include:
- Demonstrating a commitment to acquiring data from willing, informed, and appropriately compensated sources.
- Designing systems that respect end-user autonomy, e.g. with privacy-preserving techniques.
- Avoiding extractive, chauvinist, ["dark"](https://www.deceptive.design), and otherwise "unethical" patterns of engagement.
Featured Spaces:
- [lvwerra/in-the-stack-gr](https://huggingface.co/spaces/lvwerra/in-the-stack-gr)
- [zama-fhe/encrypted_sentiment_analysis](https://huggingface.co/spaces/zama-fhe/encrypted_sentiment_analysis)
"""
},
{
"title": "π Sustainable",
"content": """
These are Spaces that highlight and explore techniques for making machine learning ecologically sustainable.
Examples could include:
- Tracking emissions from training and running inferences on large language models.
- Quantization and distillation methods to reduce carbon footprints without sacrificing model quality.
Featured Space:
- [pytorch/MobileNet_v2](https://huggingface.co/spaces/pytorch/MobileNet_v2)
"""
},
{
"title": "ποΈβπ¨οΈ Socially Conscious",
"content": """
"Socially Conscious" Spaces show us how machine learning can be applied as a force for *good*!
This is quite broad, but some examples could be:
- Using machine learning as part of an effort to tackle climate change.
- Building tools to assist with medical research and practice.
- Developing models for text-to-speech, image captioning, and other tasks aimed at increasing accessibility.
- Creating systems for the digital humanities, such as for Indigenous language revitalization.
Featured Space:
- [vict0rsch/climateGAN](https://huggingface.co/spaces/vict0rsch/climateGAN)
"""
},
{
"title": "π§βπ€βπ§ Inclusive",
"content": """
These are projects which broaden the scope of who *builds* and *benefits* in the machine learning world.
This could mean things like:
- Curating diverse datasets that increase the representation of underserved groups.
- Training language models on languages that aren't yet available on the Hugging Face Hub.
- Creating no-code frameworks that allow non-technical folk to engage with AI.
Featured Spaces:
- [hackathon-pln-es/Spanish-Nahuatl-Translation](https://huggingface.co/spaces/hackathon-pln-es/Spanish-Nahuatl-Translation)
- [hackathon-pln-es/readability-assessment-spanish](https://huggingface.co/spaces/hackathon-pln-es/readability-assessment-spanish)
"""
},
{
"title": "βοΈ Rigorous",
"content": """
Among the many concerns that go into creating new models is a seemingly simple question: "Does it work?"
Rigorous projects pay special attention to examining failure cases, protecting privacy through security
measures, and ensuring that potential users (technical and non-technical) are informed of the project's
limitations.
For example:
- Projects built with models that are well-documented with [Model Cards](https://huggingface.co/docs/hub/model-cards).
- Models that are evaluated against cutting-edge benchmarks, with results reported against disaggregated sets.
- Demonstrations of models failing across ["gender, skin type, ethnicity, age or other attributes"](http://gendershades.org/overview.html).
- Techniques for mitigating issues like over-fitting and training data memorization.
Featured Spaces:
- [emilylearning/spurious_correlation_evaluation](https://huggingface.co/spaces/emilylearning/spurious_correlation_evaluation)
- [ml6team/post-processing-summarization](https://huggingface.co/spaces/ml6team/post-processing-summarization)
"""
},
{
"title": "π€ Inquisitive",
"content": """
Some projects take a radical new approach to concepts which may have become commonplace. These projects, often
rooted in critical theory, shine a light on inequities and power structures which challenge the community to
rethink its relationship to technology.
For example:
- [Reframing AI and machine learning from Indigenous perspectives](https://jods.mitpress.mit.edu/pub/lewis-arista-pechawis-kite/release/1).
- [Highlighting LGBTQIA2S+ marginalization in AI](https://edri.org/our-work/computers-are-binary-people-are-not-how-ai-systems-undermine-lgbtq-identity/).
- [Critiquing the harms perpetuated by AI systems](https://www.ajl.org).
Featured Space:
- [society-ethics/Average_diffusion_faces](https://huggingface.co/spaces/society-ethics/Average_diffusion_faces)
"""
},
]
def toggle_description(title, content):
with gr.Accordion(label=title, open=False):
gr.Markdown(content, elem_id="margin-top")
def submit_entry(URL, tags, suggestions, comments):
hf_writer.flag(
flag_data=[URL, tags, suggestions, comments]
)
return [
gr.Markdown.update(
visible=True,
value="Thank you for your submission! π€"
),
gr.Button.update(
visible=False
),
gr.Text.update(interactive=False),
gr.Checkboxgroup.update(interactive=False),
gr.Text.update(interactive=False),
gr.TextArea.update(interactive=False),
]
with gr.Blocks(css="#margin-top {margin-top: 15px} #center {justify-content: space-between;}") as demo:
with gr.Row(elem_id="center"):
with gr.Column(scale=4):
gr.Markdown("## Call for submissions! π’")
with gr.Column():
gr.Markdown("<img style='height: 7em;' src='https://huggingface.co/spaces/society-ethics/featured-spaces-submissions/resolve/main/banner.png'/>")
gr.Markdown("""
Hugging Face is collecting examples of [Spaces](https://huggingface.co/spaces) that are ethically mindful, in order to highlight and encourage these kinds of projects βΒ and we would love your input!
If you have built a Space that you think should be featured, or if you would like to nominate someone else's, paste the URL in the form below π€
The current set of tags reflect our initial categorization from going through Hugging Face Spaces: π€ consentful, π sustainable, ποΈβπ¨οΈ socially conscious, π§βπ€βπ§ inclusive, βοΈ rigorous, and π€ inquisitive.
Let us know other relevant categories and examples that you find!
""")
with gr.Accordion(label="Want to learn more? Visit us over on the Hugging Face Discord!", open=False):
gr.Markdown("""
Follow these steps to join the discussion:
1. Go to [hf.co/join/discord](https://hf.co/join/discord) to join the Discord server.
2. Once you've registered, go to the `#role-assignment` channel.
3. Select the "Open Science" role.
4. Head over to `#ethics-and-society` to join the conversation π₯³
""", elem_id="margin-top")
with gr.Row():
with gr.Column():
gr.Markdown("π‘ Click on the terms below to view their description and some examples.")
with gr.Column():
[toggle_description(x["title"], x["content"]) for x in principles]
with gr.Column():
URL = gr.Text(label="URL")
tags = gr.Checkboxgroup(
label="Tags - Pick as many as you like!",
choices=[
"Consentful",
"Sustainable",
"Socially Conscious",
"Inclusive",
"Rigorous",
"Inquisitive",
]
)
suggestions = gr.Text(label="[Optional] Do you have suggestions for other tags?")
comments = gr.TextArea(label="[Optional] Any extra comments?")
submit = gr.Button(value="Submit")
thank_you = gr.Markdown(visible=False)
submit.click(
fn=submit_entry,
inputs=[URL, tags, suggestions, comments],
outputs=[
thank_you,
submit,
URL,
tags,
suggestions,
comments,
]
)
hf_writer.setup(
components=[URL, tags, suggestions, comments],
flagging_dir="flagged"
)
demo.launch()
|