Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -57,16 +57,22 @@ with gr.Blocks() as demo:
|
|
57 |
slider2 = ImageSlider(label="birefnet", type="pil")
|
58 |
|
59 |
chameleon = load_img("butterfly.jpg", output_type="pil")
|
60 |
-
|
|
|
|
|
|
|
|
|
61 |
|
62 |
with gr.Tab("Image Upload"):
|
63 |
tab1 = gr.Interface(
|
64 |
-
fn, inputs=image, outputs=[slider1, output_file],
|
|
|
65 |
)
|
66 |
|
67 |
with gr.Tab("Image URL"):
|
68 |
tab2 = gr.Interface(
|
69 |
-
fn, inputs=text, outputs=[slider2, output_file],
|
|
|
70 |
)
|
71 |
|
72 |
def process_download(image):
|
@@ -76,4 +82,3 @@ with gr.Blocks() as demo:
|
|
76 |
|
77 |
if __name__ == "__main__":
|
78 |
demo.launch()
|
79 |
-
|
|
|
57 |
slider2 = ImageSlider(label="birefnet", type="pil")
|
58 |
|
59 |
chameleon = load_img("butterfly.jpg", output_type="pil")
|
60 |
+
example_image2 = load_img("example2.jpg", output_type="pil") # ๋ ๋ฒ์งธ ์์ ์ด๋ฏธ์ง
|
61 |
+
example_image3 = load_img("example3.jpg", output_type="pil") # ์ธ ๋ฒ์งธ ์์ ์ด๋ฏธ์ง
|
62 |
+
url1 = "https://hips.hearstapps.com/hmg-prod/images/gettyimages-1229892983-square.jpg"
|
63 |
+
url2 = "https://example.com/example2.jpg" # ๋ ๋ฒ์งธ ์์ URL
|
64 |
+
url3 = "https://example.com/example3.jpg" # ์ธ ๋ฒ์งธ ์์ URL
|
65 |
|
66 |
with gr.Tab("Image Upload"):
|
67 |
tab1 = gr.Interface(
|
68 |
+
fn, inputs=image, outputs=[slider1, output_file],
|
69 |
+
examples=[chameleon, example_image2, example_image3], api_name="image"
|
70 |
)
|
71 |
|
72 |
with gr.Tab("Image URL"):
|
73 |
tab2 = gr.Interface(
|
74 |
+
fn, inputs=text, outputs=[slider2, output_file],
|
75 |
+
examples=[url1, url2, url3], api_name="text"
|
76 |
)
|
77 |
|
78 |
def process_download(image):
|
|
|
82 |
|
83 |
if __name__ == "__main__":
|
84 |
demo.launch()
|
|