Spaces:
Paused
Paused
Add disclaimers and footer
#1
by
multimodalart
HF staff
- opened
app.py
CHANGED
@@ -41,8 +41,20 @@ from settings import (
|
|
41 |
)
|
42 |
# isort: on
|
43 |
|
44 |
-
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
if SHOW_DUPLICATE_BUTTON:
|
47 |
SPACE_ID = os.getenv('SPACE_ID')
|
48 |
DESCRIPTION += f'\n<p><a href="https://huggingface.co/spaces/{SPACE_ID}?duplicate=true"><img src="https://img.shields.io/badge/-Duplicate%20Space%20to%20skip%20the%20queue-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14" alt="Duplicate Space"></a></p>'
|
@@ -210,7 +222,7 @@ examples = [
|
|
210 |
'high quality dslr photo, a photo product of a lemon inspired by natural and organic materials, wooden accents, intricately decorated with glowing vines of led lights, inspired by baroque luxury',
|
211 |
'Aerial photo of a beach, the words "what if?" written in the sand.',
|
212 |
'A photo of a red cube on top of a blue cube. a photo of a red cube with text "blue" on it is sitting on top of a blue cube with text "red" on it. photo realism',
|
213 |
-
'a photo of a violet baseball cap with yellow text: "
|
214 |
'ultra close-up color photo portrait of rainbow owl with deer horns in the woods',
|
215 |
'product image of a crochet Cthulhu the great old one emerging from a spacetime wormhole made of wool.',
|
216 |
'a little green budgie parrot driving small red toy car in new york street, photo',
|
@@ -221,6 +233,7 @@ examples = [
|
|
221 |
]
|
222 |
|
223 |
with gr.Blocks(css='style.css') as demo:
|
|
|
224 |
gr.Markdown(DESCRIPTION)
|
225 |
with gr.Box():
|
226 |
with gr.Row(elem_id='prompt-container').style(equal_height=True):
|
@@ -371,7 +384,8 @@ with gr.Blocks(css='style.css') as demo:
|
|
371 |
label='Stage 1 param file hash name')
|
372 |
selected_index_for_stage2 = gr.Number(
|
373 |
label='Selected index for Stage 2', value=-1, precision=0)
|
374 |
-
|
|
|
375 |
stage1_inputs = [
|
376 |
prompt,
|
377 |
negative_prompt,
|
|
|
41 |
)
|
42 |
# isort: on
|
43 |
|
44 |
+
TITLE = '# [DeepFloyd IF](https://github.com/deep-floyd/IF)'
|
45 |
+
DESCRIPTION = 'The DeepFloyd IF model has been initially released as a non-commercial research-only model. Please make sure you read and abide to the [LICENSE](https://huggingface.co/spaces/DeepFloyd/deepfloyd-if-license) before using it.'
|
46 |
+
DISCLAIMER = 'In this demo, the DeepFloyd team may collect prompts, and user preferences (which of the images the user chose to upscale) for improving future models'
|
47 |
+
FOOTER = """<div class="footer">
|
48 |
+
<p>Model by <a href="https://huggingface.co/DeepFloyd" style="text-decoration: underline;" target="_blank">DeepFloyd</a> supported by <a href="https://huggingface.co/stabilityai" style="text-decoration: underline;" target="_blank">Stability AI</a>
|
49 |
+
</p>
|
50 |
+
</div>
|
51 |
+
<div class="acknowledgments">
|
52 |
+
<p><h4>LICENSE</h4>
|
53 |
+
The model is licensed with a bespoke non-commercial research-only license <a href="https://huggingface.co/spaces/DeepFloyd/deepfloyd-if-license" style="text-decoration: underline;" target="_blank">DeepFloyd IF Research License Agreement</a> license. The license forbids you from sharing any content for commercial use, or that violates any laws, produce any harm to a person, disseminate any personal information that would be meant for harm, spread misinformation and target vulnerable groups. For the full list of restrictions please <a href="https://huggingface.co/spaces/DeepFloyd/deepfloyd-if-license" style="text-decoration: underline;" target="_blank">read the license</a></p>
|
54 |
+
<p><h4>Biases and content acknowledgment</h4>
|
55 |
+
Despite how impressive being able to turn text into image is, beware to the fact that this model may output content that reinforces or exacerbates societal biases, as well as realistic faces, explicit content and violence. The model was trained on a subset of the <a href="https://laion.ai/blog/laion-5b/" style="text-decoration: underline;" target="_blank">LAION-5B dataset</a> and is meant for research purposes. You can read more in the <a href="https://huggingface.co/DeepFloyd/IF-I-IF-v1.0" style="text-decoration: underline;" target="_blank">model card</a></p>
|
56 |
+
</div>
|
57 |
+
"""
|
58 |
if SHOW_DUPLICATE_BUTTON:
|
59 |
SPACE_ID = os.getenv('SPACE_ID')
|
60 |
DESCRIPTION += f'\n<p><a href="https://huggingface.co/spaces/{SPACE_ID}?duplicate=true"><img src="https://img.shields.io/badge/-Duplicate%20Space%20to%20skip%20the%20queue-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14" alt="Duplicate Space"></a></p>'
|
|
|
222 |
'high quality dslr photo, a photo product of a lemon inspired by natural and organic materials, wooden accents, intricately decorated with glowing vines of led lights, inspired by baroque luxury',
|
223 |
'Aerial photo of a beach, the words "what if?" written in the sand.',
|
224 |
'A photo of a red cube on top of a blue cube. a photo of a red cube with text "blue" on it is sitting on top of a blue cube with text "red" on it. photo realism',
|
225 |
+
'a photo of a violet baseball cap with yellow text: "DISdeep floyd". 50mm lens, photo realism, cine lens. violet baseball cap says "deep floyd". reflections, render. yellow stitch text "deep floyd"',
|
226 |
'ultra close-up color photo portrait of rainbow owl with deer horns in the woods',
|
227 |
'product image of a crochet Cthulhu the great old one emerging from a spacetime wormhole made of wool.',
|
228 |
'a little green budgie parrot driving small red toy car in new york street, photo',
|
|
|
233 |
]
|
234 |
|
235 |
with gr.Blocks(css='style.css') as demo:
|
236 |
+
gr.Markdown(TITLE)
|
237 |
gr.Markdown(DESCRIPTION)
|
238 |
with gr.Box():
|
239 |
with gr.Row(elem_id='prompt-container').style(equal_height=True):
|
|
|
384 |
label='Stage 1 param file hash name')
|
385 |
selected_index_for_stage2 = gr.Number(
|
386 |
label='Selected index for Stage 2', value=-1, precision=0)
|
387 |
+
gr.Markdown(DISCLAIMER)
|
388 |
+
gr.HTML(FOOTER)
|
389 |
stage1_inputs = [
|
390 |
prompt,
|
391 |
negative_prompt,
|