Update app.py
Browse files"์ค๋ช ๋ค ํ๊ธ๋ก ๋ฐ๊พธ๊ณ ์๋ฏธ ๋ถ์ฌํ๊ธฐ"
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("
|
36 |
|
37 |
-
uploaded_file = st.file_uploader("
|
38 |
|
39 |
if uploaded_file is not None:
|
40 |
image = Image.open(uploaded_file)
|
41 |
-
st.image(image, caption='
|
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 == '
|
51 |
# Change hair color to blonde
|
52 |
processed_image = change_hair_to_blonde(image)
|
53 |
-
st.image(processed_image, caption='
|
54 |
-
elif action == '
|
55 |
# Add noise to the original image
|
56 |
processed_image = add_noise(image_np)
|
57 |
-
st.image(processed_image, caption='
|
|
|
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)
|