File size: 1,856 Bytes
362c704
 
 
 
c4847e9
362c704
 
 
 
 
 
 
 
 
 
5b0ab0b
7dd777f
362c704
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
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)