File size: 1,207 Bytes
2cf6be0
63f29cf
2cf6be0
fa0ee64
 
63f29cf
 
 
 
 
 
 
 
 
 
 
ad9ba71
63f29cf
2cf6be0
63f29cf
 
 
fa0ee64
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import gradio as gr
from util.text_img import generate_image

_TITLE = "Shoe Generator"
with gr.Blocks(_TITLE) as ShoeGen:
    with gr.Tab("Text to Image Generator"):
        with gr.Row():
            with gr.Column():
                prompt = gr.Textbox(label="Enter a discription of a shoe")
                # neg_prompt = gr.Textbox(label="Enter a negative prompt", value="low quality, watermark, ugly, tiling, poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame, extra limbs, body out of frame, blurry, bad anatomy, blurred, watermark, grainy, signature, cut off, draft, closed eyes, text, logo")
                button_gen = gr.Button("Generate Image")
            with gr.Column():
                with gr.Tab("With Background"):
                    image = gr.Image(label="Generated Image", show_download_button=True, show_label=False)
                with gr.Tab("Without Background"): 
                    image_nobg = gr.Image(label="Generated Image", show_download_button=True, show_label=False) 
    
        button_gen.click(generate_image, inputs=[prompt], outputs=[image, image_nobg])

    with gr.Tab("Image to Video Generator (V3D)"):
        pass
    
ShoeGen.launch()