Spaces:
Sleeping
Sleeping
update sdk
Browse files
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: 🪄🖼️
|
|
4 |
colorFrom: indigo
|
5 |
colorTo: pink
|
6 |
sdk: gradio
|
7 |
-
sdk_version:
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: apache-2.0
|
|
|
4 |
colorFrom: indigo
|
5 |
colorTo: pink
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 4.36.1
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: apache-2.0
|
app.py
CHANGED
@@ -37,16 +37,16 @@ if __name__ == "__main__":
|
|
37 |
app = gr.Blocks()
|
38 |
with app:
|
39 |
gr.Markdown("# Anime Remove Background\n\n"
|
40 |
-
"![visitor badge](https://
|
41 |
"demo for [https://github.com/SkyTNT/anime-segmentation/](https://github.com/SkyTNT/anime-segmentation/)")
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
run_btn = gr.Button(variant="primary")
|
|
|
48 |
output_mask = gr.Image(label="mask")
|
49 |
output_img = gr.Image(label="result", image_mode="RGBA")
|
50 |
-
examples.click(lambda x: x[0], [examples], [input_img])
|
51 |
run_btn.click(rmbg_fn, [input_img], [output_mask, output_img])
|
52 |
app.launch()
|
|
|
37 |
app = gr.Blocks()
|
38 |
with app:
|
39 |
gr.Markdown("# Anime Remove Background\n\n"
|
40 |
+
"![visitor badge](https://api.visitorbadge.io/api/visitors?path=skytnt.animeseg&countColor=%23263759&style=flat&labelStyle=lower)\n\n"
|
41 |
"demo for [https://github.com/SkyTNT/anime-segmentation/](https://github.com/SkyTNT/anime-segmentation/)")
|
42 |
+
|
43 |
+
with gr.Column():
|
44 |
+
input_img = gr.Image(label="input image")
|
45 |
+
examples_data = [[f"examples/{x:02d}.jpg"] for x in range(1, 4)]
|
46 |
+
examples = gr.Examples(examples=examples_data, inputs=[input_img])
|
47 |
run_btn = gr.Button(variant="primary")
|
48 |
+
with gr.Row():
|
49 |
output_mask = gr.Image(label="mask")
|
50 |
output_img = gr.Image(label="result", image_mode="RGBA")
|
|
|
51 |
run_btn.click(rmbg_fn, [input_img], [output_mask, output_img])
|
52 |
app.launch()
|