Update app.py
Browse files
app.py
CHANGED
|
@@ -14,8 +14,8 @@ st.markdown("<span style='font-size: 18px;'>์๋
ํ์ธ์! ์ ํฌ๋ ๋ฅํ์ด
|
|
| 14 |
st.markdown("<span style='font-size: 18px;'>์ ํฌ์ ๋ชฉํ๋ ์จ๋ผ์ธ์ ๊ฒ์๋ ๊ฐ์ธ์ ์ฌ์ง์ด ์
์ฑ ๋ฅํ์ดํฌ ์์์ ์ฌ์ฉ๋์ง ์๋๋ก ํ๋ ๊ฒ์
๋๋ค. ์ ์ ๋ก ์นญ์ ์์, ์ฌ๋ฌ๋ถ์ ์๊ฒฌ์ ๋ฃ๊ธฐ ์ํด ๊ฐ๋จํ ํ
์คํธ๋ฅผ ์งํํ๊ณ ์์ต๋๋ค.</span>", unsafe_allow_html=True)
|
| 15 |
st.markdown("<span style='font-size: 18px;'>์ต๊ทผ SNS์ ์
๋ก๋๋ ์ด๋ฏธ์ง๊ฐ ๋ฅํ์ดํฌ์ ์
์ฉ๋๋ ์ฌ๋ก๊ฐ ๋งค์ผ ๋ณด๊ณ ๋๊ณ ์์ต๋๋ค. ๋ฐ๋ผ์ ํด๊ฒฐ์ฑ
์ ๊ฐ๊ตฌํ๊ธฐ ์ํด, ์ฌ๋ฌ๋ถ์ ์์คํ ์๊ฒฌ์ด ํ์ํฉ๋๋ค.</span>", unsafe_allow_html=True)
|
| 16 |
st.markdown("")
|
| 17 |
-
st.markdown("<span style='font-size: 18px;'>์งํ
|
| 18 |
-
st.markdown("<span style='font-size: 18px;'>์งํ
|
| 19 |
st.markdown("<span style='font-size: 18px;'>์ฌ๋ฌ๋ถ์ ์ฐธ์ฌ์ ๊ฐ์ฌ๋๋ฆฝ๋๋ค!</span>", unsafe_allow_html=True)
|
| 20 |
st.markdown("<span style='font-size: 14px;'> *์ฌ์ ๋ฐฉ์ง ํํฐ๋: ์ฌ์ง์ ๋ฏธ์ธํ ๋ณํ๋ฅผ ์ฃผ์ด ๋ฅํ์ดํฌ ๋ชจ๋ธ์ ํ์ต๋์ง ๋ชปํ๋๋ก ๋ฐฉํดํ๋ ํํฐ.</span>", unsafe_allow_html=True)
|
| 21 |
st.markdown(
|
|
@@ -219,47 +219,28 @@ if uploaded_file is not None:
|
|
| 219 |
|
| 220 |
st.markdown('<div class="custom-caption-1">ํํฐ๋ฅผ ์
ํ ์ด๋ฏธ์ง๋ ์ก์์ผ๋ก ๋ดค์๋,ํฐ ์ฐจ์ด๊ฐ ์์</div>', unsafe_allow_html=True)
|
| 221 |
|
| 222 |
-
button_clicked = st.button("
|
| 223 |
|
| 224 |
-
# if button_clicked:
|
| 225 |
-
# with col1:
|
| 226 |
-
# processed_image = change_hair_to_blonde(image)
|
| 227 |
-
# st.image(processed_image, use_column_width=True)
|
| 228 |
-
# st.markdown('<div class="custom-caption-2">์๋ณธ ์ด๋ฏธ์ง๋ก ๋ฅํ์ดํฌ๋ฅผ ์ ์ํ ๊ฒฝ์ฐ</div>', unsafe_allow_html=True)
|
| 229 |
-
# st.markdown('<div class="custom-caption-3">์ดํด๋ฅผ ๋๊ธฐ ์ํด ์ฌ์ง์ ๋
ธ๋์์ ์
ํ๋ ๋ฅํ์ดํฌ ์๊ณ ๋ฆฌ์ฆ ์ ์ฉ. ์๋ณธ ์ด๋ฏธ์ง๋ ๋ฅํ์ดํฌ ์๊ณ ๋ฆฌ์ฆ์ ์ํฅ์ ๋ฐ์.</div>', unsafe_allow_html=True)
|
| 230 |
-
|
| 231 |
-
# with col2:
|
| 232 |
-
# deepfake_image = add_noise(image)
|
| 233 |
-
# st.image(deepfake_image, use_column_width=True)
|
| 234 |
-
# st.markdown('<div class="custom-caption-2">๋ฐฉ์ง ํํฐ ์ด๋ฏธ์ง๋ก ๋ฅํ์ดํฌ๋ฅผ ์ ์ํ ๊ฒฝ์ฐ</div>', unsafe_allow_html=True)
|
| 235 |
-
# st.markdown('<div class="custom-caption-3">๋ฐฉ์ง ํํฐ๋ฅผ ์
ํ ์ด๋ฏธ์ง๋ ๋ฅํ์ดํฌ์ ์ํฅ์ ๋ฐ์ง ์๊ณ ์์๋ณด๊ธฐ ํ๋ ์ฌ์ง์ ์ถ๋ ฅํจ์ผ๋ก์จ ์ด๋ฏธ์ง๋ฅผ ๋ณดํธํจ.</div>', unsafe_allow_html=True)
|
| 236 |
-
|
| 237 |
col3, col4 = st.columns(2)
|
| 238 |
|
| 239 |
if button_clicked:
|
| 240 |
processed_image = change_hair_to_blonde(image)
|
| 241 |
deepfake_image = add_noise(image)
|
| 242 |
else:
|
| 243 |
-
processed_image =
|
| 244 |
-
deepfake_image =
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
# st.markdown('<p class="survey">์ ์๋น์ค๋ฅผ ์ฌ์ฉํด ๋ณด์
จ๊ฑฐ๋, ์ ํฌ ๊ธฐ์ ์ ์๋ฆฌ์ ๊ด์ฌ์ด ์์ผ์ ๋ถ๋ค๊ป์ ์๋์ ๊ฐ๋จํ ์ธํฐ๋ทฐ์ ์ฐธ์ฌํด ์ฃผ์๋ฉด ์ง์ฌ์ผ๋ก ๊ฐ์ฌ๋๋ฆฌ๊ฒ ์ต๋๋ค.</p>', unsafe_allow_html=True)
|
| 263 |
-
# st.markdown('<p class="survey-1"><a href="https://docs.google.com/forms/d/e/1FAIpQLSdzRtuvQyp3CQDhlxEag40v2yDM7u9NYpJ2gv5kgwuNbo1gUA/viewform?usp=sf_link" target="_blank" class="a-tag">์ฌ๊ธฐ๋ฅผ ํด๋ฆญํ์ฌ ์ธํฐ๋ทฐ์ ์ํด ์ฃผ์ ๋ค๋ฉด ํฐ ๋์์ด ๋ ๊ฒ ๊ฐ์ต๋๋ค!!</a></p>', unsafe_allow_html=True)
|
| 264 |
-
# st.markdown('<p class="survey-2">์๋น์ค๋ฅผ ์ด์ฉํด ์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค! ์ข์ ํ๋ฃจ ๋ณด๋ด์ธ์!</p>', unsafe_allow_html=True)
|
| 265 |
-
|
|
|
|
| 14 |
st.markdown("<span style='font-size: 18px;'>์ ํฌ์ ๋ชฉํ๋ ์จ๋ผ์ธ์ ๊ฒ์๋ ๊ฐ์ธ์ ์ฌ์ง์ด ์
์ฑ ๋ฅํ์ดํฌ ์์์ ์ฌ์ฉ๋์ง ์๋๋ก ํ๋ ๊ฒ์
๋๋ค. ์ ์ ๋ก ์นญ์ ์์, ์ฌ๋ฌ๋ถ์ ์๊ฒฌ์ ๋ฃ๊ธฐ ์ํด ๊ฐ๋จํ ํ
์คํธ๋ฅผ ์งํํ๊ณ ์์ต๋๋ค.</span>", unsafe_allow_html=True)
|
| 15 |
st.markdown("<span style='font-size: 18px;'>์ต๊ทผ SNS์ ์
๋ก๋๋ ์ด๋ฏธ์ง๊ฐ ๋ฅํ์ดํฌ์ ์
์ฉ๋๋ ์ฌ๋ก๊ฐ ๋งค์ผ ๋ณด๊ณ ๋๊ณ ์์ต๋๋ค. ๋ฐ๋ผ์ ํด๊ฒฐ์ฑ
์ ๊ฐ๊ตฌํ๊ธฐ ์ํด, ์ฌ๋ฌ๋ถ์ ์์คํ ์๊ฒฌ์ด ํ์ํฉ๋๋ค.</span>", unsafe_allow_html=True)
|
| 16 |
st.markdown("")
|
| 17 |
+
st.markdown("<span style='font-size: 18px;'>์งํ ๊ณผ์ 1. ์ฌ๋ ์ด๋ฏธ์ง๋ฅผ ์
๋ก๋ํ๋ฉด, ์ฌ์ ๋ฐฉ์ง ํํฐ๊ฐ ์ ์ฉ๋ ์ด๋ฏธ์ง๋ฅผ ๋ณด์ฌ๋๋ฆฝ๋๋ค.</span>", unsafe_allow_html=True)
|
| 18 |
+
st.markdown("<span style='font-size: 18px;'>์งํ ๊ณผ์ 2. ๋ฅํ์ดํฌ ์คํ ๋ฒํผ์ ํด๋ฆญํ๋ฉด, ๋ฅํ์ดํฌ ๊ฒฐ๊ณผ๋ฅผ ํ์ธํ ์ ์์ต๋๋ค.</span>", unsafe_allow_html=True)
|
| 19 |
st.markdown("<span style='font-size: 18px;'>์ฌ๋ฌ๋ถ์ ์ฐธ์ฌ์ ๊ฐ์ฌ๋๋ฆฝ๋๋ค!</span>", unsafe_allow_html=True)
|
| 20 |
st.markdown("<span style='font-size: 14px;'> *์ฌ์ ๋ฐฉ์ง ํํฐ๋: ์ฌ์ง์ ๋ฏธ์ธํ ๋ณํ๋ฅผ ์ฃผ์ด ๋ฅํ์ดํฌ ๋ชจ๋ธ์ ํ์ต๋์ง ๋ชปํ๋๋ก ๋ฐฉํดํ๋ ํํฐ.</span>", unsafe_allow_html=True)
|
| 21 |
st.markdown(
|
|
|
|
| 219 |
|
| 220 |
st.markdown('<div class="custom-caption-1">ํํฐ๋ฅผ ์
ํ ์ด๋ฏธ์ง๋ ์ก์์ผ๋ก ๋ดค์๋,ํฐ ์ฐจ์ด๊ฐ ์์</div>', unsafe_allow_html=True)
|
| 221 |
|
| 222 |
+
button_clicked = st.button("๋ฅํ์ดํฌ ์ ์ฉํ๊ธฐ")
|
| 223 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 224 |
col3, col4 = st.columns(2)
|
| 225 |
|
| 226 |
if button_clicked:
|
| 227 |
processed_image = change_hair_to_blonde(image)
|
| 228 |
deepfake_image = add_noise(image)
|
| 229 |
else:
|
| 230 |
+
processed_image = None
|
| 231 |
+
deepfake_image = None
|
| 232 |
+
|
| 233 |
+
if processed_image is not None and deepfake_image is not None:
|
| 234 |
+
with col3:
|
| 235 |
+
st.image(processed_image, use_column_width=True)
|
| 236 |
+
st.markdown('<div class="custom-caption-2">์๋ณธ ์ด๋ฏธ์ง๋ก ๋ฅํ์ดํฌ๋ฅผ ์ ์ํ ๊ฒฝ์ฐ</div>', unsafe_allow_html=True)
|
| 237 |
+
st.markdown('<div class="custom-caption-3">์ดํด๋ฅผ ๋๊ธฐ ์ํด ์ฌ์ง์ ๋
ธ๋์์ ์
ํ๋ ๋ฅํ์ดํฌ ์๊ณ ๋ฆฌ์ฆ ์ ์ฉ. ์๋ณธ ์ด๋ฏธ์ง๋ ๋ฅํ์ดํฌ ์๊ณ ๋ฆฌ์ฆ์ ์ํฅ์ ๋ฐ์.</div>', unsafe_allow_html=True)
|
| 238 |
+
|
| 239 |
+
with col4:
|
| 240 |
+
st.image(deepfake_image, use_column_width=True)
|
| 241 |
+
st.markdown('<div class="custom-caption-2">์ฌ์ ๋ฐฉ์ง ํํฐ ์ด๋ฏธ์ง๋ก ๋ฅํ์ดํฌ๋ฅผ ์ ์ํ ๊ฒฝ์ฐ</div>', unsafe_allow_html=True)
|
| 242 |
+
st.markdown('<div class="custom-caption-3">๋ฐฉ์ง ํํฐ๋ฅผ ์
ํ ์ด๋ฏธ์ง๋ ๋ฅํ์ดํฌ์ ์ํฅ์ ๋ฐ์ง ์๊ณ ์์๋ณด๊ธฐ ํ๋ ์ฌ์ง์ ์ถ๋ ฅํจ์ผ๋ก์จ ์ด๋ฏธ์ง๋ฅผ ๋ณดํธํจ.</div>', unsafe_allow_html=True)
|
| 243 |
+
|
| 244 |
+
st.markdown('<p class="survey"> ์ ์ฌํ ์๋น์ค๋ฅผ ์ฌ์ฉํด ๋ณด์
จ๊ฑฐ๋, ์ ํฌ ๊ธฐ์ ์ ์๋ฆฌ์ ๊ด์ฌ์ด ์์ผ์ ๋ถ๋ค๊ป์ ์๋์ ๊ฐ๋จํ ์ธํฐ๋ทฐ์ ์ฐธ์ฌํด ์ฃผ์๋ฉด ์ง์ฌ์ผ๋ก ๊ฐ์ฌ๋๋ฆฌ๊ฒ ์ต๋๋ค.</p>', unsafe_allow_html=True)
|
| 245 |
+
st.markdown('<p class="survey-1"><a href="https://docs.google.com/forms/d/e/1FAIpQLSdzRtuvQyp3CQDhlxEag40v2yDM7u9NYpJ2gv5kgwuNbo1gUA/viewform?usp=sf_link" target="_blank" class="a-tag">์ธํฐ๋ทฐ๋ก ๋ฅํ์ดํฌ ๋ฐ๋ฉธ์ ์ฐธ์ฌ!!</a></p>', unsafe_allow_html=True)
|
| 246 |
+
st.markdown('<p class="survey-2">์๋น์ค๋ฅผ ์ด์ฉํด ์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค! ์ข์ ํ๋ฃจ ๋ณด๋ด์ธ์!</p>', unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|