Spaces:
Runtime error
Runtime error
Commit ·
b4a24a2
1
Parent(s): cedb0cd
Update app.py
Browse files
app.py
CHANGED
|
@@ -162,9 +162,9 @@ def batch(image_files):
|
|
| 162 |
return output,"tmp.zip"
|
| 163 |
|
| 164 |
with gr.Blocks() as iface:
|
| 165 |
-
gr.Markdown("#
|
| 166 |
-
gr.HTML("
|
| 167 |
-
with gr.Tab("
|
| 168 |
with gr.Row():
|
| 169 |
with gr.Column():
|
| 170 |
image = gr.Image(type='filepath')
|
|
@@ -172,12 +172,12 @@ with gr.Blocks() as iface:
|
|
| 172 |
image_output = gr.Image(interactive=False)
|
| 173 |
with gr.Row():
|
| 174 |
with gr.Column():
|
| 175 |
-
single_removebg = gr.Button("
|
| 176 |
with gr.Column():
|
| 177 |
-
single_clear = gr.Button("
|
| 178 |
|
| 179 |
|
| 180 |
-
with gr.Tab("
|
| 181 |
with gr.Row():
|
| 182 |
with gr.Column():
|
| 183 |
images = gr.File(file_count="multiple", file_types=["image"])
|
|
@@ -187,9 +187,9 @@ with gr.Blocks() as iface:
|
|
| 187 |
|
| 188 |
with gr.Row():
|
| 189 |
with gr.Column():
|
| 190 |
-
batch_removebg = gr.Button("
|
| 191 |
with gr.Column():
|
| 192 |
-
batch_clear = gr.Button("
|
| 193 |
#Events
|
| 194 |
single_removebg.click(inference, inputs=image, outputs=image_output)
|
| 195 |
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("#Removedor de Imagem 💚")
|
| 166 |
+
gr.HTML("Usa <a href='https://github.com/xuebinqin/DIS'>DIS</a> para remover o plano de fundo")
|
| 167 |
+
with gr.Tab("Uma Imagem"):
|
| 168 |
with gr.Row():
|
| 169 |
with gr.Column():
|
| 170 |
image = gr.Image(type='filepath')
|
|
|
|
| 172 |
image_output = gr.Image(interactive=False)
|
| 173 |
with gr.Row():
|
| 174 |
with gr.Column():
|
| 175 |
+
single_removebg = gr.Button("Remover Fundo")
|
| 176 |
with gr.Column():
|
| 177 |
+
single_clear = gr.Button("Limpar")
|
| 178 |
|
| 179 |
|
| 180 |
+
with gr.Tab("Lote"):
|
| 181 |
with gr.Row():
|
| 182 |
with gr.Column():
|
| 183 |
images = gr.File(file_count="multiple", file_types=["image"])
|
|
|
|
| 187 |
|
| 188 |
with gr.Row():
|
| 189 |
with gr.Column():
|
| 190 |
+
batch_removebg = gr.Button("Processar Lote")
|
| 191 |
with gr.Column():
|
| 192 |
+
batch_clear = gr.Button("Limpar")
|
| 193 |
#Events
|
| 194 |
single_removebg.click(inference, inputs=image, outputs=image_output)
|
| 195 |
batch_removebg.click(batch, inputs=images, outputs=[gallery,file_list])
|