Laurent
commited on
replace Button by a ClearButton
Browse files- src/app.py +4 -2
src/app.py
CHANGED
|
@@ -135,7 +135,8 @@ with gr.Blocks() as demo:
|
|
| 135 |
with gr.Column():
|
| 136 |
oimg = ImageSlider(label="Output")
|
| 137 |
with gr.Row():
|
| 138 |
-
btn = gr.
|
|
|
|
| 139 |
for inp in [iimg, prompt]:
|
| 140 |
inp.change(
|
| 141 |
fn=on_change_prompt,
|
|
@@ -205,7 +206,8 @@ with gr.Blocks() as demo:
|
|
| 205 |
with gr.Column():
|
| 206 |
oimg = ImageSlider(label="Output")
|
| 207 |
with gr.Row():
|
| 208 |
-
btn = gr.
|
|
|
|
| 209 |
annotator.change(
|
| 210 |
fn=on_change_bbox,
|
| 211 |
inputs=[annotator],
|
|
|
|
| 135 |
with gr.Column():
|
| 136 |
oimg = ImageSlider(label="Output")
|
| 137 |
with gr.Row():
|
| 138 |
+
btn = gr.ClearButton(components=[oimg], value="Erase Object", interactive=False)
|
| 139 |
+
|
| 140 |
for inp in [iimg, prompt]:
|
| 141 |
inp.change(
|
| 142 |
fn=on_change_prompt,
|
|
|
|
| 206 |
with gr.Column():
|
| 207 |
oimg = ImageSlider(label="Output")
|
| 208 |
with gr.Row():
|
| 209 |
+
btn = gr.ClearButton(components=[oimg], value="Erase Object", interactive=False)
|
| 210 |
+
|
| 211 |
annotator.change(
|
| 212 |
fn=on_change_bbox,
|
| 213 |
inputs=[annotator],
|