Update app.py
Browse files
app.py
CHANGED
|
@@ -162,8 +162,8 @@ def batch(image_files):
|
|
| 162 |
return output,"tmp.zip"
|
| 163 |
|
| 164 |
with gr.Blocks() as iface:
|
| 165 |
-
gr.Markdown("#
|
| 166 |
-
with gr.Tab("
|
| 167 |
with gr.Row():
|
| 168 |
with gr.Column():
|
| 169 |
image = gr.Image(type='filepath')
|
|
@@ -176,7 +176,7 @@ with gr.Blocks() as iface:
|
|
| 176 |
single_clear = gr.Button("清除")
|
| 177 |
|
| 178 |
|
| 179 |
-
with gr.Tab("
|
| 180 |
with gr.Row():
|
| 181 |
with gr.Column():
|
| 182 |
images = gr.File(file_count="multiple", file_types=["image"])
|
|
@@ -186,9 +186,9 @@ with gr.Blocks() as iface:
|
|
| 186 |
|
| 187 |
with gr.Row():
|
| 188 |
with gr.Column():
|
| 189 |
-
batch_removebg = gr.Button("
|
| 190 |
with gr.Column():
|
| 191 |
-
batch_clear = gr.Button("
|
| 192 |
#Events
|
| 193 |
single_removebg.click(inference, inputs=image, outputs=image_output)
|
| 194 |
batch_removebg.click(batch, inputs=images, outputs=[gallery,file_list])
|
|
|
|
| 162 |
return output,"tmp.zip"
|
| 163 |
|
| 164 |
with gr.Blocks() as iface:
|
| 165 |
+
gr.Markdown("# 去背景")
|
| 166 |
+
with gr.Tab("单张"):
|
| 167 |
with gr.Row():
|
| 168 |
with gr.Column():
|
| 169 |
image = gr.Image(type='filepath')
|
|
|
|
| 176 |
single_clear = gr.Button("清除")
|
| 177 |
|
| 178 |
|
| 179 |
+
with gr.Tab("批量"):
|
| 180 |
with gr.Row():
|
| 181 |
with gr.Column():
|
| 182 |
images = gr.File(file_count="multiple", file_types=["image"])
|
|
|
|
| 186 |
|
| 187 |
with gr.Row():
|
| 188 |
with gr.Column():
|
| 189 |
+
batch_removebg = gr.Button("批量去背景")
|
| 190 |
with gr.Column():
|
| 191 |
+
batch_clear = gr.Button("清除")
|
| 192 |
#Events
|
| 193 |
single_removebg.click(inference, inputs=image, outputs=image_output)
|
| 194 |
batch_removebg.click(batch, inputs=images, outputs=[gallery,file_list])
|