Spaces:
Runtime error
Runtime error
Commit
·
3f6cf4b
1
Parent(s):
eb708a4
Update app.py
Browse files
app.py
CHANGED
|
@@ -102,13 +102,7 @@ title = "Удаление фона изображения"
|
|
| 102 |
description = ""
|
| 103 |
article = ""
|
| 104 |
|
| 105 |
-
url = "https://huggingface.co/datasets/nateraw/background-remover-files/resolve/main/twitter_profile_pic.jpeg"
|
| 106 |
-
image = Image.open(requests.get(url, stream=True).raw)
|
| 107 |
-
image.save('twitter_profile_pic.jpg')
|
| 108 |
|
| 109 |
-
url = "https://upload.wikimedia.org/wikipedia/commons/8/8d/President_Barack_Obama.jpg"
|
| 110 |
-
image = Image.open(requests.get(url, stream=True).raw)
|
| 111 |
-
image.save('obama.jpg')
|
| 112 |
|
| 113 |
interface = gr.Interface(
|
| 114 |
fn=main,
|
|
@@ -117,7 +111,6 @@ interface = gr.Interface(
|
|
| 117 |
gr.inputs.Slider(minimum=0, maximum=250, default=100, step=5, label='Mask Cutoff Threshold'),
|
| 118 |
],
|
| 119 |
outputs='image',
|
| 120 |
-
examples=[['twitter_profile_pic.jpg', 120], ['obama.jpg', 155]],
|
| 121 |
title=title,
|
| 122 |
description=description,
|
| 123 |
article=article,
|
|
|
|
| 102 |
description = ""
|
| 103 |
article = ""
|
| 104 |
|
|
|
|
|
|
|
|
|
|
| 105 |
|
|
|
|
|
|
|
|
|
|
| 106 |
|
| 107 |
interface = gr.Interface(
|
| 108 |
fn=main,
|
|
|
|
| 111 |
gr.inputs.Slider(minimum=0, maximum=250, default=100, step=5, label='Mask Cutoff Threshold'),
|
| 112 |
],
|
| 113 |
outputs='image',
|
|
|
|
| 114 |
title=title,
|
| 115 |
description=description,
|
| 116 |
article=article,
|