Spaces:
Runtime error
Runtime error
musfiqdehan
commited on
Commit
•
9c9c432
1
Parent(s):
9d1e8fb
Update app.py from main
Browse files
app.py
CHANGED
@@ -4,7 +4,9 @@ import torch
|
|
4 |
import numpy as np
|
5 |
from torchvision import transforms
|
6 |
|
7 |
-
|
|
|
|
|
8 |
|
9 |
|
10 |
def make_transparent_foreground(pic, mask):
|
@@ -66,9 +68,11 @@ model.eval()
|
|
66 |
|
67 |
gr.Interface(
|
68 |
inference,
|
69 |
-
gr.Image(type="pil", label="Input"),
|
70 |
-
gr.Image(type="pil", label="Output"),
|
|
|
71 |
description=description,
|
|
|
72 |
examples=[['demis.jpg'], ['lifeifei.png']],
|
73 |
-
|
74 |
-
).launch(debug=False)
|
|
|
4 |
import numpy as np
|
5 |
from torchvision import transforms
|
6 |
|
7 |
+
title = "Remove Bg"
|
8 |
+
description = "Automatically remove the image background from a profile photo."
|
9 |
+
article = "<p style='text-align: center'><a href='https://news.machinelearning.sg/posts/beautiful_profile_pics_remove_background_image_with_deeplabv3/'>Blog</a> | <a href='https://github.com/eugenesiow/practical-ml'>Github Repo</a></p>"
|
10 |
|
11 |
|
12 |
def make_transparent_foreground(pic, mask):
|
|
|
68 |
|
69 |
gr.Interface(
|
70 |
inference,
|
71 |
+
gr.inputs.Image(type="pil", label="Input"),
|
72 |
+
gr.outputs.Image(type="pil", label="Output"),
|
73 |
+
title=title,
|
74 |
description=description,
|
75 |
+
article=article,
|
76 |
examples=[['demis.jpg'], ['lifeifei.png']],
|
77 |
+
enable_queue=True
|
78 |
+
).launch(debug=False)
|