Spaces:
Runtime error
Runtime error
Logan Zoellner
commited on
Commit
·
40e5857
1
Parent(s):
8f115fa
slightly prettier?
Browse files
app.py
CHANGED
@@ -142,20 +142,22 @@ with demo:
|
|
142 |
"<div>Next, use GPT-J to generate a short description</div>"
|
143 |
"<div>Finally, Generate an illustration 🎨 provided by Latent Diffusion model.</div>"
|
144 |
)
|
|
|
145 |
with gr.Row():
|
146 |
-
|
|
|
|
|
|
|
|
|
147 |
input_name = gr.Textbox(label="name",placeholder="Drizzt")
|
148 |
input_race = gr.Textbox(label="race",placeholder="dark elf")
|
149 |
input_class = gr.Textbox(label="class",placeholder="ranger")
|
150 |
input_pronoun = gr.Textbox(label="pronoun",placeholder="he")
|
151 |
|
152 |
-
|
153 |
-
|
|
|
154 |
|
155 |
-
b0 = gr.Button("Randomize name,race and class")
|
156 |
-
b1 = gr.Button("Generate NPC")
|
157 |
-
b2 = gr.Button("Generate Image")
|
158 |
-
|
159 |
b0.click(npc_randomize,inputs=[],outputs=[input_name,input_race,input_class,input_pronoun])
|
160 |
b1.click(npc_generate, inputs=[ input_name,input_race,input_class,input_pronoun], outputs=poem_txt)
|
161 |
b2.click(poem_to_image, poem_txt, output_image)
|
|
|
142 |
"<div>Next, use GPT-J to generate a short description</div>"
|
143 |
"<div>Finally, Generate an illustration 🎨 provided by Latent Diffusion model.</div>"
|
144 |
)
|
145 |
+
|
146 |
with gr.Row():
|
147 |
+
b0 = gr.Button("Randomize name,race and class")
|
148 |
+
b1 = gr.Button("Generate NPC")
|
149 |
+
b2 = gr.Button("Generate Image")
|
150 |
+
|
151 |
+
with gr.Row():
|
152 |
input_name = gr.Textbox(label="name",placeholder="Drizzt")
|
153 |
input_race = gr.Textbox(label="race",placeholder="dark elf")
|
154 |
input_class = gr.Textbox(label="class",placeholder="ranger")
|
155 |
input_pronoun = gr.Textbox(label="pronoun",placeholder="he")
|
156 |
|
157 |
+
with gr.Row():
|
158 |
+
poem_txt = gr.Textbox(label="description",lines=7)
|
159 |
+
output_image = gr.Image(label="portrait",type="filepath", shape=(256,256))
|
160 |
|
|
|
|
|
|
|
|
|
161 |
b0.click(npc_randomize,inputs=[],outputs=[input_name,input_race,input_class,input_pronoun])
|
162 |
b1.click(npc_generate, inputs=[ input_name,input_race,input_class,input_pronoun], outputs=poem_txt)
|
163 |
b2.click(poem_to_image, poem_txt, output_image)
|