File size: 13,663 Bytes
cfae725
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7c5755e
cfae725
 
 
7c5755e
cfae725
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7c5755e
cfae725
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8a26a56
 
 
 
cfae725
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a5439af
cfae725
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93991e3
 
 
 
cfae725
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b7d7a39
 
cfae725
 
 
 
01ace0b
cfae725
01ace0b
cfae725
 
 
 
 
 
 
ba71c34
cfae725
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7c5755e
cfae725
 
 
 
 
 
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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
import gradio as gr
from typing import List


class Space:
    def __init__(self, title, id):
        self.title = title
        self.id = id


class News:
    def __init__(self, title, link):
        self.title = title
        self.link = link


class Category:
    def __init__(self, title, description, news: List[News] = None, spaces=None):
        if news is None:
            news = []

        if spaces is None:
            spaces = []

        self.title = title
        self.description = description
        self.news = news
        self.spaces = spaces


inclusive = Category(
    title="πŸ§‘β€πŸ€β€πŸ§‘ Inclusive",
    description="""
    These are projects which broaden the scope of who _builds_ and _benefits_ in the machine learning world.
    <br><br>
    Examples of this can include:
    <br><br>
    - 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 and low-code frameworks that allow non-technical folk to engage with AI.        
    """,
    news=[
        News(
            title="πŸš€ Gradio 3.19 - Bugfixes and improved UI/UX for embedded apps",
            link="https://twitter.com/Gradio/status/1627702506250805248"
        ),
        News(
            title="🧨 Diffusers 0.13 - New pipelines for editing and guiding models",
            link="https://twitter.com/multimodalart/status/1627727910801928192"
        )
    ],
    spaces=[
        Space(
            title="Promptist Demo",
            id="microsoft/Promptist"
        ),
        Space(
            title="MMTAfrica: Multilingual Machine Translation",
            id="edaiofficial/mmtafrica"
        ),
        Space(
            title="Spanish to Quechua translation",
            id="hackathon-pln-es/spanish-to-quechua-translation"
        ),
    ]
)
rigorous = Category(
    title="✍️ Rigorous",
    description="""
    Among the many concerns that go into creating new models is a seemingly simple question: "Does it work?"
    <br><br>
    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.
    <br><br>
    Examples:
    <br><br>
    - Projects built with models that are well-documented with Model Cards.
    - Tools that provide transparency into how a model was trained and how it behaves.
    - Evaluations against cutting-edge benchmarks, with results reported against disaggregated sets.
    - Demonstrations of models failing across gender, skin type, ethnicity, age or other attributes.
    - Techniques for mitigating issues like over-fitting and training data memorization.
    """,
    news=[
        News(
            title="πŸ—žοΈ AI chatbots are coming to search engines β€” can you trust the results?",
            link="https://www.nature.com/articles/d41586-023-00423-4"
        ),
        News(
            title="πŸ“‘ Model Cards: Introducing new documentation tools",
            link="https://huggingface.co/blog/model-cards"
        ),
        News(
            title="πŸ€— Ethics & Society Newsletter #2: Let's talk about bias!",
            link="https://huggingface.co/blog/ethics-soc-2"
        )
    ],
    spaces=[
        Space(
            title="A Watermark for Large Language Models",
            id="tomg-group-umd/lm-watermarking"
        ),
        Space(
            title="Roots Search Tool",
            id="bigscience-data/roots-search"
        ),
        Space(
            title="Diffusion Bias Explorer",
            id="society-ethics/DiffusionBiasExplorer"
        ),
        Space(
            title="Disaggregators",
            id="society-ethics/disaggregators"
        )
    ]
)
socially_conscious = Category(
    title="πŸ‘οΈβ€πŸ—¨οΈ Socially Conscious",
    description="""
    Socially Conscious work shows us how machine learning can support efforts toward a stronger society!
    <br><br>
    Examples:
    <br><br>
    - Using machine learning as part of an effort to tackle climate change.
    - Building tools to assist with medical research and practice.
    - 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.        
    """,
    news=[
        News(
            title="πŸ¦“ New dataset: LILA Camera Traps",
            link="https://huggingface.co/datasets/society-ethics/lila_camera_traps"
        ),
        News(
            title="πŸ§‘β€πŸ”¬ Deep Learning With Proteins",
            link="https://huggingface.co/blog/deep-learning-with-proteins"
        )
    ],
    spaces=[
        Space(
            title="Comparing Captioning Models",
            id="nielsr/comparing-captioning-models"
        ),
        Space(
            title="Whisper Speaker Diarization",
            id="vumichien/whisper-speaker-diarization"
        ),
        Space(
            title="Speech Recognition from visual lip movement",
            id="vumichien/lip_movement_reading"
        ),
        Space(
            title="Socratic Models Image Captioning",
            id="Geonmo/socratic-models-image-captioning-with-BLOOM"
        ),
    ]
)
consentful = Category(
    title="🀝 Consentful",
    description="""
    [What is consentful tech?](https://www.consentfultech.io)
    Consentful technology supports the self-determination of people who use and are affected by these technologies.
    <br><br>
    Examples of this can include:
    <br><br>
    - 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.
    """,
    news=[
        News(
            title="πŸŽ₯ MoroccoAI webinar - Loubna Ben Allal - 'Building open large models for code'",
            link="https://twitter.com/MoroccoAI/status/1629105224848646144"
        ),
        News(
            title="The Stack - 3 TB of Permissively Licensed Source Code",
            link="https://www.bigcode-project.org/docs/about/the-stack/"
        )
    ],
    spaces=[
        Space(
            title="Sentiment Analysis on Encrypted Data with FHE",
            id="zama-fhe/encrypted_sentiment_analysis"
        ),
        Space(
            title="SantaCoder: Code Generation",
            id="bigcode/santacoder-demo"
        ),
        Space(
            title="Data Anonymization in Autonomous Driving",
            id="khaclinh/self-driving-anonymization"
        ),
        Space(
            title="Raising the Cost of Malicious AI-Powered Image Editing",
            id="RamAnanth1/photoguard"
        ),
    ]
)
sustainable = Category(
    title="🌎 Sustainable",
    description="""
    This is work that highlights and explores techniques for making machine learning ecologically sustainable.
    <br><br>
    Examples
    <br><br>
    - Tracking emissions from training and running inferences on large language models.
    - Quantization and distillation methods to reduce carbon footprints without sacrificing model quality.        
    """,
    news=[
        News(
            title="πŸ”” New paper: Counting Carbon – Luccioni & Hernandez-Garcia, 2023",
            link="https://twitter.com/SashaMTL/status/1626572394130292737"
        ),
        News(
            title="PEFT: Parameter-Efficient Fine-Tuning on Low-Resource Hardware",
            link="https://huggingface.co/blog/peft"
        )
    ],
    spaces=[
        Space(
            title="Hugging Face Carbon Compare Tool",
            id="huggingface/Carbon-Compare"
        ),
        Space(
            title="Image Classification with EfficientFormer-L1",
            id="adirik/efficientformer"
        ),
        Space(
            title="EfficientNetV2 Deepfakes Video Detector",
            id="Ron0420/EfficientNetV2_Deepfakes_Video_Detector"
        ),
    ]
)
inquisitive = Category(
    title="πŸ€” Inquisitive",
    description="""
    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.
    <br><br>
    Examples:
    <br><br>
    - Reframing AI and machine learning from Indigenous perspectives.
    - Highlighting LGBTQIA2S+ marginalization in AI.
    - Critiquing the harms perpetuated by AI systems.
    - Discussing the role of "openness" in AI research.
    """,
    news=[
        News(
            title="πŸŽ™οΈ NPR: Know It All: What Is AI And How Will It Shape The Future?",
            link="https://www.npr.org/2023/02/20/1158300530/know-it-all-what-is-ai-and-how-will-it-shape-the-future"
        ),
        News(
            title="🦜 DAIR's Stochastic Parrots Day is on March 17",
            link="https://twitter.com/emilymbender/status/1627312284392640513"
        ),
        News(
            title="🌈 New paper: The Gradient of Generative AI Release – Solaiman, 2023",
            link="https://twitter.com/IreneSolaiman/status/1625158317378252800"
        ),
        News(
            title="βš–οΈ Diffusers has a brand new Ethical Guidelines doc!",
            link="https://github.com/huggingface/diffusers/pull/2330"
        )
    ],
    spaces=[
        Space(
            title="Spanish Gender Neutralizer",
            id="hackathon-pln-es/es_nlp_gender_neutralizer"
        ),
        Space(
            title="PAIR: Datasets Have Worldviews",
            id="merve/dataset-worldviews"
        ),

    ]
)

categories = [rigorous, consentful, socially_conscious, sustainable, inclusive, inquisitive]


def news_card(news):
    with gr.Box():
        with gr.Row(elem_id="news-row"):
            gr.Markdown(f"{news.title}")
            button = gr.Button(elem_id="article-button", value="Read more πŸ”—")
            button.click(fn=None, _js=f"() => window.open('{news.link}')")


def space_card(space):
    with gr.Box(elem_id="space-card"):
        with gr.Row(elem_id="news-row"):
            gr.Markdown(f"{space.title}")
            button = gr.Button(elem_id="article-button", value="View πŸ”­")
            button.click(fn=None, _js=f"() => window.open('https://hf.space/{space.id}')")


def category_tab(category):
    with gr.Tab(label=category.title, elem_id="news-tab"):
        with gr.Row():
            with gr.Column():
                gr.Markdown(category.description, elem_id="margin-top")
            with gr.Column():
                gr.Markdown("### Hugging Face News πŸ“°")
                [news_card(x) for x in category.news]
        # with gr.Tab(label="Hugging Face Projects"):
        #     gr.Markdown("....")
        with gr.Tab(label="Spaces"):
            with gr.Row(elem_id="spaces-flex"):
                [space_card(x) for x in category.spaces]
        with gr.Tab(label="Models - Coming Soon!"):
            gr.Markdown(elem_id="margin-top", value="#### Check back soon for featured models πŸ€—")
        with gr.Tab(label="Datasets - Coming Soon!"):
            gr.Markdown(elem_id="margin-top", value="#### Check back soon for featured datasets πŸ€—")


with gr.Blocks(css="#margin-top {margin-top: 15px} #center {text-align: center;} #news-tab {padding: 15px;} #news-tab h3 {margin: 0px; text-align: center;} #news-tab p {margin: 0px;} #article-button {flex-grow: initial;} #news-row {align-items: center;} #spaces-flex {flex-wrap: wrap;} #space-card { display: flex; min-width: calc(90% / 3); max-width:calc(100% / 3); box-sizing: border-box;}") as demo:
    with gr.Row(elem_id="center"):
        gr.Markdown("# Ethics & Society at Hugging Face")

    gr.Markdown("""
    At Hugging Face, we are committed to operationalizing ethics at the cutting-edge of machine learning. This page is dedicated to highlighting projects – inside and outside Hugging Face – in order to encourage and support more ethical development and use of AI. We wish to foster ongoing conversations of ethics and values; this means that this page will evolve over time, and your feedback is invaluable. Please open up an issue in the [Community tab](https://huggingface.co/spaces/society-ethics/about/discussions) to share your thoughts!
    """)

    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")

    gr.Markdown("""
    ### What does ethical AI look like?

    We analyzed the submissions on Hugging Face Spaces and put together a set of 6 high-level categories for describing ethical aspects of machine learning work. Visit each tab to learn more about each category and to see what Hugging Face and its community have been up to! Is there a Space that you'd like to see featured? [Submit it here πŸš€](https://huggingface.co/spaces/society-ethics/featured-spaces-submissions)
    """)

    with gr.Column():
        [category_tab(x) for x in categories]

demo.launch()