Spaces:
Runtime error
Runtime error
Commit
·
3fdd7da
1
Parent(s):
6861425
Update copy
Browse files
README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
emoji: 🖼
|
4 |
colorFrom: purple
|
5 |
colorTo: red
|
|
|
1 |
---
|
2 |
+
title: Perspectives on AI
|
3 |
emoji: 🖼
|
4 |
colorFrom: purple
|
5 |
colorTo: red
|
app.py
CHANGED
@@ -23,9 +23,10 @@ API_CREATE_ENDPOINT = f"{API_ENDPOINT}/{DREAMLOOK_API_ENDPOINT_IMAGE_CREATE_PATH
|
|
23 |
API_STATUS_ENDPOINT = f"{API_ENDPOINT}/jobs/image-gen/"
|
24 |
|
25 |
examples = [
|
26 |
-
"
|
|
|
27 |
"The poster features a model striking a pose while wearing a blue outfit that blends with the blue background. Bold yellow text across the upper half reads 'Tu vois la vie en Dim!'. There is a yellow and blue square graphic on the right side with additional text. The overall aesthetic is vibrant and energetic.",
|
28 |
-
"
|
29 |
]
|
30 |
|
31 |
NEGATIVE_PROMPT = "lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, text, signature, watermark, username, blurry"
|
@@ -90,10 +91,16 @@ def infer(prompt, negative_prompt, seed, randomize_seed, guidance_scale):
|
|
90 |
|
91 |
|
92 |
with gr.Blocks() as demo:
|
|
|
|
|
|
|
|
|
|
|
93 |
with gr.Row():
|
94 |
with gr.Column():
|
95 |
prompt = gr.Textbox(
|
96 |
label="Prompt",
|
|
|
97 |
placeholder="Enter your prompt",
|
98 |
max_lines=10,
|
99 |
)
|
@@ -102,17 +109,34 @@ with gr.Blocks() as demo:
|
|
102 |
placeholder="Enter a negative prompt (optional)",
|
103 |
visible=False
|
104 |
)
|
105 |
-
seed = gr.Slider(
|
106 |
-
|
107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
# num_inference_steps = gr.Slider(label="Number of Inference Steps", minimum=10, maximum=30, value=20)
|
109 |
gr.Examples(
|
110 |
examples=examples,
|
111 |
inputs=[prompt],
|
112 |
-
label="
|
113 |
)
|
114 |
run_button = gr.Button(
|
115 |
-
"
|
116 |
)
|
117 |
|
118 |
with gr.Column():
|
|
|
23 |
API_STATUS_ENDPOINT = f"{API_ENDPOINT}/jobs/image-gen/"
|
24 |
|
25 |
examples = [
|
26 |
+
# "an illustrated poster with bold typography showing a duck eating nestle chocolate",
|
27 |
+
"A dark-toned poster featuring intricate, vertical sculptural designs with cultural motifs. The text is white, creating a stark contrast, and the overall composition is minimalist yet striking.",
|
28 |
"The poster features a model striking a pose while wearing a blue outfit that blends with the blue background. Bold yellow text across the upper half reads 'Tu vois la vie en Dim!'. There is a yellow and blue square graphic on the right side with additional text. The overall aesthetic is vibrant and energetic.",
|
29 |
+
"A screen-printed poster with a high-contrast black and red design, featuring a monochrome illustration of a person, and bold, flowing text in white and red: \"Da oggi vestiamo anche lui! Les Griffes UOMO Lugano, Via Pioda 9 GHERARDINI in esclusiva\"",
|
30 |
]
|
31 |
|
32 |
NEGATIVE_PROMPT = "lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, text, signature, watermark, username, blurry"
|
|
|
91 |
|
92 |
|
93 |
with gr.Blocks() as demo:
|
94 |
+
gr.Markdown("# Perspectives on AI")
|
95 |
+
gr.Markdown("In the context of the AGI [Perspectives on AI](https://agi-open.com/) exhibition, [dreamlook.ai](https://dreamlook.ai/) has created an image generation model using thousands of posters from the [Plakatsammlung der Schule für Gestaltung Basel](https://www.sfgbasel.ch/plakatsammlung) to enable exploration of this collection through prompts.")
|
96 |
+
# gr.Markdown("Write a prompt then click on \"Generate image\"")
|
97 |
+
gr.Markdown("[Read more...](https://dreamlook.ai/perspectives-on-ai)")
|
98 |
+
|
99 |
with gr.Row():
|
100 |
with gr.Column():
|
101 |
prompt = gr.Textbox(
|
102 |
label="Prompt",
|
103 |
+
info="Describe the image you want to generate, or click on a sample prompt below.",
|
104 |
placeholder="Enter your prompt",
|
105 |
max_lines=10,
|
106 |
)
|
|
|
109 |
placeholder="Enter a negative prompt (optional)",
|
110 |
visible=False
|
111 |
)
|
112 |
+
seed = gr.Slider(
|
113 |
+
label="Seed",
|
114 |
+
info="The random number used to create your image. Change it to explore variants.",
|
115 |
+
minimum=0,
|
116 |
+
maximum=MAX_SEED,
|
117 |
+
value=42,
|
118 |
+
visible=True
|
119 |
+
)
|
120 |
+
randomize_seed = gr.Checkbox(
|
121 |
+
label="Randomize Seed",
|
122 |
+
value=False,
|
123 |
+
visible=False
|
124 |
+
)
|
125 |
+
guidance_scale = gr.Slider(
|
126 |
+
label="Guidance Scale",
|
127 |
+
info="Defined how much your prompt is taken into account when generating the image.",
|
128 |
+
minimum=5.0,
|
129 |
+
maximum=15.0,
|
130 |
+
value=10.0
|
131 |
+
)
|
132 |
# num_inference_steps = gr.Slider(label="Number of Inference Steps", minimum=10, maximum=30, value=20)
|
133 |
gr.Examples(
|
134 |
examples=examples,
|
135 |
inputs=[prompt],
|
136 |
+
label="Sample prompts",
|
137 |
)
|
138 |
run_button = gr.Button(
|
139 |
+
"Generate image",
|
140 |
)
|
141 |
|
142 |
with gr.Column():
|