ShoeGenv2 / app.py
MaxMilan1
massive changes / restucturing
63f29cf
raw
history blame
1.21 kB
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()