CSB261 commited on
Commit
cda3f0b
โ€ข
1 Parent(s): 9ea4ecb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
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
- url = "https://hips.hearstapps.com/hmg-prod/images/gettyimages-1229892983-square.jpg"
 
 
 
 
61
 
62
  with gr.Tab("Image Upload"):
63
  tab1 = gr.Interface(
64
- fn, inputs=image, outputs=[slider1, output_file], examples=[chameleon], api_name="image"
 
65
  )
66
 
67
  with gr.Tab("Image URL"):
68
  tab2 = gr.Interface(
69
- fn, inputs=text, outputs=[slider2, output_file], examples=[url], api_name="text"
 
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()