Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| import os | |
| import sys | |
| model = ["claudfuen/photorealistic-fuen-v1"] | |
| 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") | |
| css = """""" | |
| with gr.Blocks(css=css) as sim: | |
| with gr.Row(): | |
| gr.HTML(""" <title>Dreamlike Photoreal</title> <div style="text-align: center; max-width: 1400px; margin: 0 auto;"> | |
| <h1>Dreamlike Photoreal</h1>""") | |
| with gr.Row(): | |
| inputtext = gr.Textbox(label="Short Prompt", lines=1) | |
| genbut = gr.Button("Generate Prompts") | |
| runbut = gr.Button("Generate Images") | |
| with gr.Row(): | |
| output1 = gr.Image(label=(f"{model[0]}")) | |
| output2 = gr.Image(label=(f"{model[0]}")) | |
| output3 = gr.Image(label=(f"{model[0]}")) | |
| output4 = gr.Image(label=(f"{model[0]}")) | |
| with gr.Row(): | |
| gentext1 = gr.Textbox(lines=2) | |
| gentext2 = gr.Textbox(lines=2) | |
| gentext3 = gr.Textbox(lines=2) | |
| gentext4 = gr.Textbox(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) | |
| 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) | |
| sim.queue(concurrency_count=200) | |
| sim.launch(inline=True, max_threads=400) |