multimodalart HF staff commited on
Commit
88a2efd
1 Parent(s): 35222b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -13
app.py CHANGED
@@ -57,16 +57,6 @@ with gr.Blocks(css=css) as demo:
57
  gr.Markdown('''# CosXL demo
58
  Unofficial demo for CosXL, a SDXL model tuned to produce full color range images. CosXL Edit allows you to perform edits on images. Both have a [non-commercial community license](https://huggingface.co/stabilityai/cosxl/blob/main/LICENSE)
59
  ''')
60
- with gr.Tab("CosXL"):
61
- with gr.Group():
62
- with gr.Row():
63
- prompt_normal = gr.Textbox(show_label=False, scale=4, placeholder="Your prompt, e.g.: backlit photography of a dog")
64
- button_normal = gr.Button("Generate", min_width=120)
65
- output_normal = gr.Image(label="Your result image", interactive=False)
66
- with gr.Accordion("Advanced Settings", open=False):
67
- negative_prompt_normal = gr.Textbox(label="Negative Prompt")
68
- guidance_scale_normal = gr.Number(label="Guidance Scale", value=7)
69
- gr.Examples(examples=normal_examples, fn=run_normal, inputs=[prompt_normal], outputs=[output_normal], cache_examples=True)
70
  with gr.Tab("CosXL Edit"):
71
  with gr.Group():
72
  image_edit = gr.Image(label="Image you would like to edit", type="pil")
@@ -78,9 +68,17 @@ with gr.Blocks(css=css) as demo:
78
  negative_prompt_edit = gr.Textbox(label="Negative Prompt")
79
  guidance_scale_edit = gr.Number(label="Guidance Scale", value=7)
80
  gr.Examples(examples=edit_examples, fn=run_edit, inputs=[image_edit, prompt_edit], outputs=[output_edit], cache_examples=True)
81
- button_edit.click(
82
-
83
- )
 
 
 
 
 
 
 
 
84
  gr.on(
85
  triggers=[
86
  button_normal.click,
 
57
  gr.Markdown('''# CosXL demo
58
  Unofficial demo for CosXL, a SDXL model tuned to produce full color range images. CosXL Edit allows you to perform edits on images. Both have a [non-commercial community license](https://huggingface.co/stabilityai/cosxl/blob/main/LICENSE)
59
  ''')
 
 
 
 
 
 
 
 
 
 
60
  with gr.Tab("CosXL Edit"):
61
  with gr.Group():
62
  image_edit = gr.Image(label="Image you would like to edit", type="pil")
 
68
  negative_prompt_edit = gr.Textbox(label="Negative Prompt")
69
  guidance_scale_edit = gr.Number(label="Guidance Scale", value=7)
70
  gr.Examples(examples=edit_examples, fn=run_edit, inputs=[image_edit, prompt_edit], outputs=[output_edit], cache_examples=True)
71
+ with gr.Tab("CosXL"):
72
+ with gr.Group():
73
+ with gr.Row():
74
+ prompt_normal = gr.Textbox(show_label=False, scale=4, placeholder="Your prompt, e.g.: backlit photography of a dog")
75
+ button_normal = gr.Button("Generate", min_width=120)
76
+ output_normal = gr.Image(label="Your result image", interactive=False)
77
+ with gr.Accordion("Advanced Settings", open=False):
78
+ negative_prompt_normal = gr.Textbox(label="Negative Prompt")
79
+ guidance_scale_normal = gr.Number(label="Guidance Scale", value=7)
80
+ gr.Examples(examples=normal_examples, fn=run_normal, inputs=[prompt_normal], outputs=[output_normal], cache_examples=True)
81
+
82
  gr.on(
83
  triggers=[
84
  button_normal.click,