File size: 1,245 Bytes
08e3ebb
222f6f5
08e3ebb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
da035ed
08e3ebb
 
 
 
 
 
da035ed
08e3ebb
 
 
 
222f6f5
08e3ebb
 
 
 
222f6f5
08e3ebb
 
 
 
 
 
 
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
import gradio as gr
from sd_utils import *



with gr.Blocks() as interface:
    #gr.HTML(value=HTML_TEMPLATE, show_label=False)
    with gr.Row():
        text_input = gr.Textbox(
            label="Enter your prompt here",
            placeholder="A portrait James bond in the style of ...",
        )
        concept_dropdown = gr.Dropdown(
            label="Select an SD Concept",
            choices=["midjourney", "birb", "indian-watercolor", "Marc Allante", "herge"],
            value='Dream'
        )


        seed = gr.Slider(
            label="Random Seed",
            minimum=0,
            maximum=10000,
            step=1,
            value=42
        )
        inputs = [text_input, concept_dropdown, seed]

    with gr.Row():
        outputs = gr.Gallery(
            label="Generated Image", show_label=True,
            columns=[1], rows=[1], object_fit="contain"
        )

    with gr.Row():
        button = gr.Button("Generate")
        button.click(generate_with_embs_custom_loss, inputs=inputs, outputs=outputs)

    with gr.Row():
        gr.Examples(examples=get_examples(), inputs=inputs, outputs=outputs, fn=generate_art, cache_examples=True)


if __name__ == "__main__":
    interface.launch(enable_queue=True)