Spaces:
Runtime error
Runtime error
File size: 2,520 Bytes
58412b2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
import gradio as gr
import os
import sys
model = ["dreamlike-art/dreamlike-anime-1.0"]
proc1 = gr.Interface.load(f"models/{model[0]}", live=True, postprocess=True, preprocess=True)
proc2 = gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion_link")
proc3 = gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion_link")
proc4 = gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion_link")
proc5 = gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion_link")
proc5 = gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion_link")
proc6 = gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion_link")
proc7 = gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion_link")
css = """"""
with gr.Blocks(css=css) as sim:
with gr.Row():
gr.HTML("""""")
with gr.Row():
inputtext = gr.Textbox(label="Prompt Idea", placeholder="Eg. Cute anime girl", lines=1)
genbut = gr.Button("Generate Prompts")
runbut = gr.Button("Generate Images", variant="primary")
with gr.Row():
output1 = gr.Image(label="")
output2 = gr.Image(label="")
output3 = gr.Image(label="")
with gr.Row():
gentext1 = gr.Textbox(label="Generated Prompt", lines=2)
gentext2 = gr.Textbox(label="Generated Prompt", lines=2)
gentext3 = gr.Textbox(label="Generated Prompt", lines=2)
with gr.Row():
output4 = gr.Image(label="")
output5 = gr.Image(label="")
output6 = gr.Image(label="")
with gr.Row():
gentext4 = gr.Textbox(label="Generated Prompt", lines=2)
gentext5 = gr.Textbox(label="Generated Prompt", lines=2)
gentext6 = gr.Textbox(label="Generated Prompt", lines=2)
genbut.click(proc2, inputs=inputtext, outputs=gentext1)
genbut.click(proc3, inputs=inputtext, outputs=gentext2)
genbut.click(proc4, inputs=inputtext, outputs=gentext3)
genbut.click(proc5, inputs=inputtext, outputs=gentext4)
genbut.click(proc6, inputs=inputtext, outputs=gentext5)
genbut.click(proc7, inputs=inputtext, outputs=gentext6)
runbut.click(proc1, inputs=gentext1, outputs=output1)
runbut.click(proc1, inputs=gentext2, outputs=output2)
runbut.click(proc1, inputs=gentext3, outputs=output3)
runbut.click(proc1, inputs=gentext4, outputs=output4)
runbut.click(proc1, inputs=gentext5, outputs=output5)
runbut.click(proc1, inputs=gentext6, outputs=output6)
sim.queue(concurrency_count=200)
sim.launch(inline=True, max_threads=400) |