update ui
Browse files
__pycache__/live_preview_helpers.cpython-310.pyc
CHANGED
Binary files a/__pycache__/live_preview_helpers.cpython-310.pyc and b/__pycache__/live_preview_helpers.cpython-310.pyc differ
|
|
__pycache__/optim_utils.cpython-310.pyc
CHANGED
Binary files a/__pycache__/optim_utils.cpython-310.pyc and b/__pycache__/optim_utils.cpython-310.pyc differ
|
|
__pycache__/utils.cpython-310.pyc
CHANGED
Binary files a/__pycache__/utils.cpython-310.pyc and b/__pycache__/utils.cpython-310.pyc differ
|
|
app.py
CHANGED
@@ -8,8 +8,6 @@ import re
|
|
8 |
import transformers
|
9 |
import open_clip
|
10 |
|
11 |
-
# from Pilot-Phase3.optim_utils import optimize_prompt
|
12 |
-
# from Pi
|
13 |
from optim_utils import optimize_prompt
|
14 |
from utils import (
|
15 |
clean_response_gpt, setup_model, init_gpt_api, call_gpt_api,
|
@@ -275,9 +273,9 @@ css = """
|
|
275 |
}
|
276 |
.abstract-text {
|
277 |
text-align: justify;
|
278 |
-
line-height: 1.
|
279 |
-
margin:
|
280 |
-
padding: 0.5rem;
|
281 |
background-color: rgba(0, 0, 0, 0.05);
|
282 |
border-radius: 8px;
|
283 |
border-left: 4px solid #3498db;
|
@@ -307,21 +305,22 @@ css = """
|
|
307 |
margin-bottom: 0rem;
|
308 |
color: #333;
|
309 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
310 |
"""
|
311 |
|
312 |
with gr.Blocks(theme=gr.themes.Soft(font=[gr.themes.GoogleFont("Inconsolata"), "Arial", "sans-serif"]), css=css) as demo:
|
313 |
with gr.Column(elem_id="col-container", elem_classes=["header-section"]):
|
314 |
-
gr.
|
315 |
-
gr.HTML('<div><img src="images/icon.png" width="200"></div>')
|
316 |
gr.Markdown("### Supporting Prompting Creativity with Automated Expansion of Text-to-Image Generation")
|
317 |
-
|
318 |
-
# <strong>Abstract:</strong> State-of-the-art visual generative AI tools hold immense potential to assist users in the early ideation stages of creative tasks — offering the ability to generate (rather than search for) novel and unprecedented (instead of existing) images of considerable quality that also adhere to boundless combinations of user specifications. However, many large-scale text-to-image systems are designed for broad applicability, yielding conventional output that may limit creative exploration. They also employ interaction methods that may be difficult for beginners. #
|
319 |
-
gr.Markdown("""
|
320 |
-
<div class="abstract-text">
|
321 |
-
<strong>Abstract:</strong> Given that creative end-users often operate in diverse, context-specific ways that are often unpredictable, more variation and personalization are necessary. We introduce POET, a real-time interactive tool that (1) automatically discovers dimensions of homogeneity in text-to-image generative models, (2) expands these dimensions to diversify the output space of generated images, and (3) learns from user feedback to personalize expansions. Focusing on visual creativity, POET offers a first glimpse of how interaction techniques of future text-to-image generation tools may support and align with more pluralistic values and the needs of end-users during the ideation stages of their work.
|
322 |
-
</div>
|
323 |
-
""", elem_classes=["abstract-text"])
|
324 |
-
|
325 |
# Paper Link
|
326 |
gr.HTML("""
|
327 |
<div style="text-align: center;">
|
@@ -330,8 +329,12 @@ with gr.Blocks(theme=gr.themes.Soft(font=[gr.themes.GoogleFont("Inconsolata"), "
|
|
330 |
</a>
|
331 |
</div>
|
332 |
""")
|
|
|
|
|
|
|
|
|
|
|
333 |
|
334 |
-
# Authors
|
335 |
gr.Markdown("""
|
336 |
<div class="authors-section">
|
337 |
<a href="https://scholar.google.com/citations?user=HXED4kIAAAAJ&hl=en">Evans Han</a>, <a href"https://www.aliceqian.com/">Alice Qian Zhang</a>,
|
|
|
8 |
import transformers
|
9 |
import open_clip
|
10 |
|
|
|
|
|
11 |
from optim_utils import optimize_prompt
|
12 |
from utils import (
|
13 |
clean_response_gpt, setup_model, init_gpt_api, call_gpt_api,
|
|
|
273 |
}
|
274 |
.abstract-text {
|
275 |
text-align: justify;
|
276 |
+
line-height: 1.5;
|
277 |
+
margin: 0rem 0;
|
278 |
+
padding: 0 0.5rem;
|
279 |
background-color: rgba(0, 0, 0, 0.05);
|
280 |
border-radius: 8px;
|
281 |
border-left: 4px solid #3498db;
|
|
|
305 |
margin-bottom: 0rem;
|
306 |
color: #333;
|
307 |
}
|
308 |
+
.logo-container {
|
309 |
+
text-align: center;
|
310 |
+
margin: 0.5rem 0 1rem 0;
|
311 |
+
}
|
312 |
+
.logo-container img {
|
313 |
+
height: 60px;
|
314 |
+
width: auto;
|
315 |
+
max-width: 150px;
|
316 |
+
display: inline-block;
|
317 |
+
}
|
318 |
"""
|
319 |
|
320 |
with gr.Blocks(theme=gr.themes.Soft(font=[gr.themes.GoogleFont("Inconsolata"), "Arial", "sans-serif"]), css=css) as demo:
|
321 |
with gr.Column(elem_id="col-container", elem_classes=["header-section"]):
|
322 |
+
gr.HTML('<div class="logo-container"><img src="https://huggingface.co/spaces/PAI-GEN/POET/resolve/main/images/icon.png" alt="POET Logo"></div>')
|
|
|
323 |
gr.Markdown("### Supporting Prompting Creativity with Automated Expansion of Text-to-Image Generation")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
324 |
# Paper Link
|
325 |
gr.HTML("""
|
326 |
<div style="text-align: center;">
|
|
|
329 |
</a>
|
330 |
</div>
|
331 |
""")
|
332 |
+
gr.Markdown("""
|
333 |
+
<div class="abstract-text">
|
334 |
+
<strong>Abstract:</strong> Given that creative end-users often operate in diverse, context-specific ways that are often unpredictable, more variation and personalization are necessary. We introduce POET, a real-time interactive tool that (1) automatically discovers dimensions of homogeneity in text-to-image generative models, (2) expands these dimensions to diversify the output space of generated images, and (3) learns from user feedback to personalize expansions. Focusing on visual creativity, POET offers a first glimpse of how interaction techniques of future text-to-image generation tools may support and align with more pluralistic values and the needs of end-users during the ideation stages of their work.
|
335 |
+
</div>
|
336 |
+
""", elem_classes=["abstract-text"])
|
337 |
|
|
|
338 |
gr.Markdown("""
|
339 |
<div class="authors-section">
|
340 |
<a href="https://scholar.google.com/citations?user=HXED4kIAAAAJ&hl=en">Evans Han</a>, <a href"https://www.aliceqian.com/">Alice Qian Zhang</a>,
|