Spaces:
Runtime error
Runtime error
Commit
·
d73189d
1
Parent(s):
268a0a9
Update app.py
Browse files
app.py
CHANGED
|
@@ -158,8 +158,7 @@ block = gr.Blocks(css=css)
|
|
| 158 |
|
| 159 |
examples = [
|
| 160 |
[
|
| 161 |
-
'A photo of
|
| 162 |
-
7.5
|
| 163 |
]
|
| 164 |
|
| 165 |
]
|
|
@@ -213,6 +212,15 @@ with block:
|
|
| 213 |
<h1 style="font-weight: 900; margin-bottom: 7px;margin-top:5px">
|
| 214 |
FairDiffusion Demo
|
| 215 |
</h1>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 216 |
</div>
|
| 217 |
</div>
|
| 218 |
"""
|
|
@@ -258,6 +266,9 @@ with block:
|
|
| 258 |
# randomize=True,
|
| 259 |
# )
|
| 260 |
|
|
|
|
|
|
|
|
|
|
| 261 |
|
| 262 |
text.submit(infer, inputs=[text], outputs=[gallery])
|
| 263 |
btn.click(infer, inputs=[text], outputs=[gallery])
|
|
|
|
| 158 |
|
| 159 |
examples = [
|
| 160 |
[
|
| 161 |
+
'A photo of the face of a firefighter',
|
|
|
|
| 162 |
]
|
| 163 |
|
| 164 |
]
|
|
|
|
| 212 |
<h1 style="font-weight: 900; margin-bottom: 7px;margin-top:5px">
|
| 213 |
FairDiffusion Demo
|
| 214 |
</h1>
|
| 215 |
+
<p style="margin-bottom: 10px; font-size: 94%; line-height: 23px;">
|
| 216 |
+
FairDiffusion is the latest strategy to introduce fairness after the deployment of generative text-to-image models <br>
|
| 217 |
+
This unofficial demo is based on the <a
|
| 218 |
+
href="https://github.com/ml-research/Fair-Diffusion"
|
| 219 |
+
style="text-decoration: underline;"
|
| 220 |
+
target="_blank"
|
| 221 |
+
>Github Implementation</a
|
| 222 |
+
>.</a>
|
| 223 |
+
</p>
|
| 224 |
</div>
|
| 225 |
</div>
|
| 226 |
"""
|
|
|
|
| 266 |
# randomize=True,
|
| 267 |
# )
|
| 268 |
|
| 269 |
+
ex = gr.Examples(examples=examples, fn=infer, inputs=[text], outputs=[gallery], cache_examples=True)
|
| 270 |
+
ex.dataset.headers = [""]
|
| 271 |
+
|
| 272 |
|
| 273 |
text.submit(infer, inputs=[text], outputs=[gallery])
|
| 274 |
btn.click(infer, inputs=[text], outputs=[gallery])
|