Spaces:
Runtime error
Runtime error
layout change
Browse files
app.py
CHANGED
@@ -121,14 +121,14 @@ def main():
|
|
121 |
|
122 |
with gr.Blocks() as demo:
|
123 |
gr.HTML("""<h1 style="font-weight: 900; margin-bottom: 7px;">Expressive Text-to-Image Generation with Rich Text</h1>
|
124 |
-
<p>
|
125 |
-
<p> <a href="https://rich-text-to-image.github.io">[Website]</a> | <a href="https://github.com/SongweiGe/rich-text-to-image">[Code]</a> <p/> """)
|
126 |
with gr.Row():
|
127 |
with gr.Column():
|
128 |
rich_text_el = gr.HTML(canvas_html, elem_id="canvas_html")
|
129 |
rich_text_input = gr.Textbox(value="", visible=False)
|
130 |
text_input = gr.Textbox(
|
131 |
label='Rich-text JSON Input',
|
|
|
132 |
max_lines=1,
|
133 |
placeholder='Example: \'{"ops":[{"insert":"a Gothic "},{"attributes":{"color":"#b26b00"},"insert":"church"},{"insert":" in a the sunset with a beautiful landscape in the background.\n"}]}\'')
|
134 |
negative_prompt = gr.Textbox(
|
@@ -171,6 +171,7 @@ def main():
|
|
171 |
|
172 |
with gr.Column():
|
173 |
richtext_result = gr.Image(label='Rich-text')
|
|
|
174 |
with gr.Row():
|
175 |
plaintext_result = gr.Image(label='Plain-text')
|
176 |
token_map = gr.Image(label='Token Maps')
|
@@ -200,7 +201,7 @@ def main():
|
|
200 |
],
|
201 |
[
|
202 |
'{"ops":[{"attributes":{"link":"the awe-inspiring sky and ocean in the style of J.M.W. Turner"},"insert":"the awe-inspiring sky and sea"},{"insert":" by "},{"attributes":{"font":"mirza"},"insert":"a coast with flowers and grasses in spring"}]}',
|
203 |
-
'',
|
204 |
512,
|
205 |
512,
|
206 |
9,
|
|
|
121 |
|
122 |
with gr.Blocks() as demo:
|
123 |
gr.HTML("""<h1 style="font-weight: 900; margin-bottom: 7px;">Expressive Text-to-Image Generation with Rich Text</h1>
|
124 |
+
<p> <a href="https://rich-text-to-image.github.io">[Website]</a> | <a href="https://github.com/SongweiGe/rich-text-to-image">[Code]</a> | <a href="https://arxiv.org/abs/2304.06720">[Paper]</a> <p/> """)
|
|
|
125 |
with gr.Row():
|
126 |
with gr.Column():
|
127 |
rich_text_el = gr.HTML(canvas_html, elem_id="canvas_html")
|
128 |
rich_text_input = gr.Textbox(value="", visible=False)
|
129 |
text_input = gr.Textbox(
|
130 |
label='Rich-text JSON Input',
|
131 |
+
visible=False,
|
132 |
max_lines=1,
|
133 |
placeholder='Example: \'{"ops":[{"insert":"a Gothic "},{"attributes":{"color":"#b26b00"},"insert":"church"},{"insert":" in a the sunset with a beautiful landscape in the background.\n"}]}\'')
|
134 |
negative_prompt = gr.Textbox(
|
|
|
171 |
|
172 |
with gr.Column():
|
173 |
richtext_result = gr.Image(label='Rich-text')
|
174 |
+
richtext_result.style(height=512)
|
175 |
with gr.Row():
|
176 |
plaintext_result = gr.Image(label='Plain-text')
|
177 |
token_map = gr.Image(label='Token Maps')
|
|
|
201 |
],
|
202 |
[
|
203 |
'{"ops":[{"attributes":{"link":"the awe-inspiring sky and ocean in the style of J.M.W. Turner"},"insert":"the awe-inspiring sky and sea"},{"insert":" by "},{"attributes":{"font":"mirza"},"insert":"a coast with flowers and grasses in spring"}]}',
|
204 |
+
'worst quality, dark, poor quality',
|
205 |
512,
|
206 |
512,
|
207 |
9,
|