hatmanstack commited on
Commit
8956ae5
·
1 Parent(s): f8a965f

Added Descriptions Inpaint/Outpaint

Browse files
Files changed (1) hide show
  1. app.py +10 -12
app.py CHANGED
@@ -48,12 +48,12 @@ with gr.Blocks() as demo:
48
 
49
  </style>
50
  """)
51
- gr.Markdown("<h1>Amazon Nova Canvas Image Generation</h1>", elem_classes="center-markdown" )
52
 
53
  with gr.Tab("Text to Image"):
54
  with gr.Column():
55
  gr.Markdown("""
56
- Generate an image from a text prompt using the Amazon Nova Canvas model.
57
  """, elem_classes="center-markdown")
58
  prompt = gr.Textbox(label="Prompt", placeholder="Enter a text prompt (1-1024 characters)", max_lines=4)
59
  gr.Button("Generate Prompt").click(generate_nova_prompt, outputs=prompt)
@@ -66,12 +66,9 @@ with gr.Blocks() as demo:
66
  with gr.Tab("Inpainting"):
67
  with gr.Column():
68
  gr.Markdown("""
69
-
70
- Modify specific areas of your image using inpainting. Upload your base Image then choose one of two ways to specify the areas you want to edit:
71
- You can use the in app editing tool to draw masks for areas to edit or use the Mask Prompt field to direct the model how to infer the mask. <b>ONLY
72
- ONE</b> of these methods can be used at a time. Create an optional prompt to tell the model how to fill in the area you mask.
73
-
74
- """, elem_classes="center-markdown")
75
  mask_image = gr.ImageEditor(
76
  type="pil",
77
  height="100%",
@@ -99,9 +96,9 @@ with gr.Blocks() as demo:
99
  with gr.Tab("Outpainting"):
100
  with gr.Column():
101
  gr.Markdown("""
102
- Modify areas outside of your image using outpainting. Give the image a transparent border by adding padding then draw
103
- a mask on the image or border where you would like the model to generate new content. The other option is to allow the model to infer the mask from the Mask Prompt. In options, you can choose to precisley follow the mask or transition smoothly
104
- between the masked area and the non-masked area. Create an optional prompt to tell the model how to fill in the area you mask.
105
  """, elem_classes="center-markdown")
106
  mask_image = gr.ImageEditor(
107
  type="pil",
@@ -132,7 +129,8 @@ with gr.Blocks() as demo:
132
  with gr.Tab("Image Variation"):
133
  with gr.Column():
134
  gr.Markdown("""
135
- Create a variation image based on up to 5 other images and a Similarity slider available in options. You can add a prompt to direct the model (optional). Images should be .png or .jpg.
 
136
  """, elem_classes="center-markdown")
137
  images = gr.File(type='filepath', label="Input Images", file_count="multiple", file_types=["image"])
138
  with gr.Accordion("Optional Prompt", open=False):
 
48
 
49
  </style>
50
  """)
51
+ gr.Markdown("<h1>AWS Nova Canvas Image Generation</h1>", elem_classes="center-markdown" )
52
 
53
  with gr.Tab("Text to Image"):
54
  with gr.Column():
55
  gr.Markdown("""
56
+ Generate an image from a text prompt using the AWS Nova Canvas model.
57
  """, elem_classes="center-markdown")
58
  prompt = gr.Textbox(label="Prompt", placeholder="Enter a text prompt (1-1024 characters)", max_lines=4)
59
  gr.Button("Generate Prompt").click(generate_nova_prompt, outputs=prompt)
 
66
  with gr.Tab("Inpainting"):
67
  with gr.Column():
68
  gr.Markdown("""
69
+ Modify specific areas of your image using inpainting. Upload your base image, then specify areas to edit using either
70
+ the in-app editing tool to draw masks or the Mask Prompt field to let the model infer the mask. Note that only one masking
71
+ method can be used at a time. You can provide an optional prompt to guide how the model fills in masked areas.""", elem_classes="center-markdown")
 
 
 
72
  mask_image = gr.ImageEditor(
73
  type="pil",
74
  height="100%",
 
96
  with gr.Tab("Outpainting"):
97
  with gr.Column():
98
  gr.Markdown("""
99
+ Modify areas outside of your image using outpainting. Add transparent padding for a border, and use the crop feature to
100
+ position your base image. The model can infer the mask from your Mask Prompt. Choose between precise mask boundaries or
101
+ smooth transitions between masked and unmasked areas, and optionally provide a prompt to guide how masked areas are filled.
102
  """, elem_classes="center-markdown")
103
  mask_image = gr.ImageEditor(
104
  type="pil",
 
129
  with gr.Tab("Image Variation"):
130
  with gr.Column():
131
  gr.Markdown("""
132
+ Create a variation image based on up to 5 other images and a Similarity slider available in options. You can add a prompt to direct the
133
+ model (optional). Images should be .png or .jpg.
134
  """, elem_classes="center-markdown")
135
  images = gr.File(type='filepath', label="Input Images", file_count="multiple", file_types=["image"])
136
  with gr.Accordion("Optional Prompt", open=False):