Spaces:
Runtime error
Runtime error
yourusername
commited on
Commit
β’
8c3253d
1
Parent(s):
eabc299
:sparkles: add example
Browse files
app.py
CHANGED
@@ -104,7 +104,12 @@ article = "<div style='text-align: center;'> <a href='https://github.com/ZHKKKe/
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
108 |
interface = gr.Interface(
|
109 |
fn=main,
|
110 |
inputs=[
|
@@ -112,7 +117,7 @@ interface = gr.Interface(
|
|
112 |
gr.inputs.Slider(minimum=0, maximum=250, default=100, step=5, label='Mask Cutoff Threshold'),
|
113 |
],
|
114 |
outputs='image',
|
115 |
-
examples=[['twitter_profile_pic.
|
116 |
title=title,
|
117 |
description=description,
|
118 |
article=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,
|
115 |
inputs=[
|
|
|
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,
|