arxivgpt kim
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,7 @@ import numpy as np
|
|
2 |
import torch
|
3 |
import torch.nn.functional as F
|
4 |
from torchvision.transforms.functional import normalize
|
|
|
5 |
from huggingface_hub import hf_hub_download
|
6 |
import gradio as gr
|
7 |
from PIL import Image
|
@@ -55,12 +56,18 @@ def process(image):
|
|
55 |
|
56 |
return new_im
|
57 |
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
with gr.Column():
|
60 |
-
gr.Markdown("누끼따기의 왕 '누킹'(Nuking)")
|
61 |
input_image = gr.Image(type="pil")
|
62 |
output_image = gr.Image()
|
63 |
-
process_button = gr.Button("Remove Background")
|
64 |
process_button.click(fn=process, inputs=input_image, outputs=output_image)
|
65 |
|
66 |
demo.launch()
|
|
|
2 |
import torch
|
3 |
import torch.nn.functional as F
|
4 |
from torchvision.transforms.functional import normalize
|
5 |
+
from briarmbg import BriaRMBG
|
6 |
from huggingface_hub import hf_hub_download
|
7 |
import gradio as gr
|
8 |
from PIL import Image
|
|
|
56 |
|
57 |
return new_im
|
58 |
|
59 |
+
|
60 |
+
css = """
|
61 |
+
footer {
|
62 |
+
visibility: hidden;
|
63 |
+
}
|
64 |
+
"""
|
65 |
+
|
66 |
+
with gr.Blocks(css=css) as demo:
|
67 |
with gr.Column():
|
|
|
68 |
input_image = gr.Image(type="pil")
|
69 |
output_image = gr.Image()
|
70 |
+
process_button = gr.Button("Remove Background Image")
|
71 |
process_button.click(fn=process, inputs=input_image, outputs=output_image)
|
72 |
|
73 |
demo.launch()
|