minhwai commited on
Commit
7334e19
โ€ข
1 Parent(s): 0a1e073

Update app.py

Browse files

"์„ค๋ช…๋“ค ํ•œ๊ธ€๋กœ ๋ฐ”๊พธ๊ณ  ์˜๋ฏธ ๋ถ€์—ฌํ•˜๊ธฐ"

Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -32,13 +32,13 @@ def add_noise(image):
32
  noisy_image = cv2.add(image_np, noise)
33
  return noisy_image
34
 
35
- st.title("Image Processing MVP")
36
 
37
- uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "png", "jpeg"])
38
 
39
  if uploaded_file is not None:
40
  image = Image.open(uploaded_file)
41
- st.image(image, caption='Uploaded Image.', use_column_width=True)
42
  st.write("")
43
  st.write("Processing...")
44
 
@@ -47,11 +47,11 @@ if uploaded_file is not None:
47
 
48
  action = st.radio("Choose an action:", ('A', 'B'))
49
 
50
- if action == 'A':
51
  # Change hair color to blonde
52
  processed_image = change_hair_to_blonde(image)
53
- st.image(processed_image, caption='Image with Blonde Hair.', use_column_width=True)
54
- elif action == 'B':
55
  # Add noise to the original image
56
  processed_image = add_noise(image_np)
57
- st.image(processed_image, caption='Image with Noise.', use_column_width=True)
 
32
  noisy_image = cv2.add(image_np, noise)
33
  return noisy_image
34
 
35
+ st.title("๋”ฅํŽ˜์ดํฌ ์‚ฌ์ „ ๋ฐฉ์ง€ ํ•„ํ„ฐ ์”Œ์šฐ๊ธฐ")
36
 
37
+ uploaded_file = st.file_uploader("ํ•„ํ„ฐ๋ฅผ ์”Œ์šธ ์ด๋ฏธ์ง€๋ฅผ ์—…๋กœ๋“œํ•˜์„ธ์š”...", type=["jpg", "png", "jpeg"])
38
 
39
  if uploaded_file is not None:
40
  image = Image.open(uploaded_file)
41
+ st.image(image, caption='๋…ธ์ด์ฆˆ ์”Œ์šด ์ด๋ฏธ์ง€', use_column_width=True)
42
  st.write("")
43
  st.write("Processing...")
44
 
 
47
 
48
  action = st.radio("Choose an action:", ('A', 'B'))
49
 
50
+ if action == '์›๋ณธ ์‚ฌ์ง„์ด ๋”ฅํŽ˜์ดํฌ์— ์ž…๋ ฅ๋œ ๊ฒฝ์šฐ':
51
  # Change hair color to blonde
52
  processed_image = change_hair_to_blonde(image)
53
+ st.image(processed_image, caption='์›๋ณธ ์‚ฌ์ง„์ด ๋”ฅํŽ˜์ดํฌ์— ์ž…๋ ฅ๋œ ๊ฒฝ์šฐ', use_column_width=True)
54
+ elif action == '๋ฐฉ์–ด๋œ ์‚ฌ์ง„์ด ๋”ฅํŽ˜์ดํฌ์— ์ž…๋ ฅ๋œ ๊ฒฝ์šฐ':
55
  # Add noise to the original image
56
  processed_image = add_noise(image_np)
57
+ st.image(processed_image, caption='๋ฐฉ์–ด๋œ ์‚ฌ์ง„์ด ๋”ฅํŽ˜์ดํฌ์— ์ž…๋ ฅ๋œ ๊ฒฝ์šฐ', use_column_width=True)