Update app.py
Browse files
app.py
CHANGED
@@ -196,7 +196,7 @@ with gr.Blocks() as demo:
|
|
196 |
gr.Examples(examples=example_inps, inputs=[canvas],
|
197 |
label='examples', cache_examples='lazy', outputs=[],
|
198 |
fn=change_image)
|
199 |
-
gr.Markdown(f"Each image
|
200 |
|
201 |
with gr.Column():
|
202 |
result_info0 = gr.Text(label="Response")
|
@@ -205,7 +205,7 @@ with gr.Blocks() as demo:
|
|
205 |
|
206 |
# mask_np_list_updated.value = copy.deepcopy(mask_np_list.value) #!!
|
207 |
mask_np_list_updated = mask_np_list
|
208 |
-
gr.Markdown("""<p style="text-align: center; font-size: 20px">Edit Mask (Do not change it during the
|
209 |
slider = gr.Slider(0, 20, step=1, label = 'mask id', visible=False)
|
210 |
label = gr.Text(label='label')
|
211 |
|
@@ -281,7 +281,7 @@ with gr.Blocks() as demo:
|
|
281 |
edge_thickness = gr.Number(value="10", label="Editing: Edge thickness", interactive= True )
|
282 |
strength = gr.Textbox(value="0.5", label="Editing: Mask strength", interactive= True )
|
283 |
|
284 |
-
add_button = gr.Button("Step 2. Run Editing",interactive =
|
285 |
def run_edit_text_wrapper(
|
286 |
mask_np_list,
|
287 |
mask_label_list,
|
|
|
196 |
gr.Examples(examples=example_inps, inputs=[canvas],
|
197 |
label='examples', cache_examples='lazy', outputs=[],
|
198 |
fn=change_image)
|
199 |
+
gr.Markdown(f"Each image must first undergo segmentation. Afterwards, you can modify the \n mask ID and the prompt for image editing, then proceed with the editing process. \n The link of D-edit paper: [https://arxiv.org/abs/2403.04880v2](https://arxiv.org/abs/2403.04880v2), [https://huggingface.co/papers/2403.04880](https://huggingface.co/papers/2403.04880)")
|
200 |
|
201 |
with gr.Column():
|
202 |
result_info0 = gr.Text(label="Response")
|
|
|
205 |
|
206 |
# mask_np_list_updated.value = copy.deepcopy(mask_np_list.value) #!!
|
207 |
mask_np_list_updated = mask_np_list
|
208 |
+
gr.Markdown("""<p style="text-align: center; font-size: 20px">Edit Mask (Do not change it during the editing process)</p>""")
|
209 |
slider = gr.Slider(0, 20, step=1, label = 'mask id', visible=False)
|
210 |
label = gr.Text(label='label')
|
211 |
|
|
|
281 |
edge_thickness = gr.Number(value="10", label="Editing: Edge thickness", interactive= True )
|
282 |
strength = gr.Textbox(value="0.5", label="Editing: Mask strength", interactive= True )
|
283 |
|
284 |
+
add_button = gr.Button("Step 2. Run Editing",interactive = True)
|
285 |
def run_edit_text_wrapper(
|
286 |
mask_np_list,
|
287 |
mask_label_list,
|