cosxl / app.py
multimodalart's picture
Update app.py
77e039c verified
raw
history blame
No virus
1.31 kB
import gradio as gr
with gr.Blocks() as demo:
gr.Markdown('''# CosXL unofficial demo
CosXL is a SDXL model tuned to produce full color range images. CosXL Edit allows you to perform edits on images. Both models have a [non-commercial community license](https://huggingface.co/stabilityai/cosxl/blob/main/LICENSE)
''')
with gr.Tab("CosXL"):
with gr.Group():
with gr.Row():
prompt_normal = gr.Textbox(show_label=False, scale=4, placeholder="Your prompt, e.g.: backlit photography of a dog")
button_normal = gr.Button("Generate", min_width=120)
output_normal = gr.Image(label="Your result image", interactive=False)
with gr.Accordion("Advanced Settings", open=False):
pass
with gr.Tab("CosXL Edit"):
with gr.Group():
image_edit = gr.Image(label="Image you would like to edit")
with gr.Row():
prompt_edit = gr.Textbox(show_label=False, scale=4, placeholder="Edit instructions, e.g.: Make the day cloudy")
button_edit = gr.Button("Generate", min_width=120)
output_edit = gr.Image(label="Your result image", interactive=False)
with gr.Accordion("Advanced Settings", open=False):
pass
if __name__ == "__main__":
demo.launch()