File size: 1,064 Bytes
ec3b96a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import gradio as gr

with gr.Blocks() as demo:
    gr.Markdown("# CosXL unofficial demo")
    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()