Spaces:
Runtime error
Runtime error
Commit
·
6aa4b7b
1
Parent(s):
505a591
Attempt to newer
Browse files
app.py
CHANGED
@@ -47,11 +47,11 @@ css_mt = {"margin-top": "1em"}
|
|
47 |
empty = gr.outputs.HTML()
|
48 |
|
49 |
with gr.Blocks() as mindseye:
|
50 |
-
gr.Markdown("<h1>MindsEye Lite <small><small>run multiple text-to-image models in one place</small></small></h1><
|
51 |
gr.Markdown("<style>.mx-auto.container .gr-form-gap {flex-direction: row; gap: calc(1rem * calc(1 - var(--tw-space-y-reverse)));} .mx-auto.container .gr-form-gap .flex-col, .mx-auto.container .gr-form-gap .gr-box{width: 100%}</style>")
|
52 |
text = gr.inputs.Textbox(placeholder="Try writing something..", label="Prompt")
|
53 |
-
with gr.Column():
|
54 |
-
|
55 |
with gr.Tabs():
|
56 |
with gr.TabItem("Latent Diffusion"):
|
57 |
steps = gr.inputs.Slider(label="Steps - more steps can increase quality but will take longer to generate",default=45,maximum=50,minimum=1,step=1)
|
@@ -65,7 +65,7 @@ with gr.Blocks() as mindseye:
|
|
65 |
aspect = gr.inputs.Radio(label="Aspect Ratio", choices=["Square", "Horizontal", "Vertical"],default="Square")
|
66 |
model = gr.inputs.Dropdown(label="Model", choices=["Surrealism","Realism", "Emoji"], default="Surrealism")
|
67 |
get_image_rudalle = gr.Button("Generate Image",css=css_mt)
|
68 |
-
|
69 |
with gr.Tabs():
|
70 |
with gr.TabItem("Image output"):
|
71 |
image = gr.outputs.Image()
|
@@ -74,4 +74,4 @@ with gr.Blocks() as mindseye:
|
|
74 |
|
75 |
get_image_latent.click(text2image_latent, inputs=[text,steps,width,height,images,diversity], outputs=[image,gallery])
|
76 |
get_image_rudalle.click(text2image_rudalle, inputs=[text,aspect,model], outputs=image)
|
77 |
-
mindseye.launch(share=False)
|
|
|
47 |
empty = gr.outputs.HTML()
|
48 |
|
49 |
with gr.Blocks() as mindseye:
|
50 |
+
gr.Markdown("<h1>MindsEye Lite <small><small>run multiple text-to-image models in one place</small></small></h1><p>MindsEye Lite orchestrates multiple text-to-image Hugging Face Spaces in one convenient space, so you can try different models. This work carries the spirit of <a href='https://multimodal.art/mindseye' target='_blank'>MindsEye Beta</a>, a tool to run multiple models with a single UI, but adjusted to the current hardware limitations of Spaces. MindsEye Lite was created by <a style='color: rgb(99, 102, 241);font-weight:bold' href='https://twitter.com/multimodalart' target='_blank'>@multimodalart</a>, keep up with the <a style='color: rgb(99, 102, 241);' href='https://multimodal.art/news' target='_blank'>latest multimodal ai art news here</a> and consider <a style='color: rgb(99, 102, 241);' href='https://www.patreon.com/multimodalart' target='_blank'>supporting us on Patreon</a></div></p>")
|
51 |
gr.Markdown("<style>.mx-auto.container .gr-form-gap {flex-direction: row; gap: calc(1rem * calc(1 - var(--tw-space-y-reverse)));} .mx-auto.container .gr-form-gap .flex-col, .mx-auto.container .gr-form-gap .gr-box{width: 100%}</style>")
|
52 |
text = gr.inputs.Textbox(placeholder="Try writing something..", label="Prompt")
|
53 |
+
#with gr.Column():
|
54 |
+
with gr.Row():
|
55 |
with gr.Tabs():
|
56 |
with gr.TabItem("Latent Diffusion"):
|
57 |
steps = gr.inputs.Slider(label="Steps - more steps can increase quality but will take longer to generate",default=45,maximum=50,minimum=1,step=1)
|
|
|
65 |
aspect = gr.inputs.Radio(label="Aspect Ratio", choices=["Square", "Horizontal", "Vertical"],default="Square")
|
66 |
model = gr.inputs.Dropdown(label="Model", choices=["Surrealism","Realism", "Emoji"], default="Surrealism")
|
67 |
get_image_rudalle = gr.Button("Generate Image",css=css_mt)
|
68 |
+
with gr.Row():
|
69 |
with gr.Tabs():
|
70 |
with gr.TabItem("Image output"):
|
71 |
image = gr.outputs.Image()
|
|
|
74 |
|
75 |
get_image_latent.click(text2image_latent, inputs=[text,steps,width,height,images,diversity], outputs=[image,gallery])
|
76 |
get_image_rudalle.click(text2image_rudalle, inputs=[text,aspect,model], outputs=image)
|
77 |
+
mindseye.launch(share=False)
|