Update app.py
Browse files
app.py
CHANGED
|
@@ -32,12 +32,20 @@ css = """
|
|
| 32 |
justify-items: center;
|
| 33 |
}
|
| 34 |
|
| 35 |
-
.custom-caption-1, .custom-caption-2 {
|
| 36 |
font-size: 20px;
|
| 37 |
font-weight: bold;
|
| 38 |
text-align: center;
|
| 39 |
margin-top: 10px;
|
| 40 |
-
color:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
}
|
| 42 |
|
| 43 |
@media only screen and (max-width: 768px) {
|
|
@@ -126,31 +134,31 @@ if uploaded_file is not None:
|
|
| 126 |
|
| 127 |
st.markdown('<div class="container">', unsafe_allow_html=True)
|
| 128 |
|
| 129 |
-
st.markdown('<div>', unsafe_allow_html=True)
|
| 130 |
st.image(image, use_column_width=True)
|
| 131 |
st.markdown('<div class="custom-caption-1">์
๋ก๋ํ ์ด๋ฏธ์ง</div>', unsafe_allow_html=True)
|
| 132 |
st.markdown('</div>', unsafe_allow_html=True)
|
| 133 |
|
| 134 |
-
st.markdown('<div>', unsafe_allow_html=True)
|
| 135 |
st.image(image, use_column_width=True)
|
| 136 |
st.markdown('<div class="custom-caption-1">ํํฐ๋ฅผ ์
ํ ์ด๋ฏธ์ง</div>', unsafe_allow_html=True)
|
| 137 |
st.markdown('</div>', unsafe_allow_html=True)
|
| 138 |
|
| 139 |
st.markdown('</div>', unsafe_allow_html=True)
|
| 140 |
|
| 141 |
-
button_clicked = st.button("์๋จ์ ๋ ์ฌ์ง์ ๋ฅํ์ดํฌ ๋ชจ๋ธ์ ํ์ต์ํค๊ธฐ")
|
| 142 |
|
| 143 |
if button_clicked:
|
| 144 |
st.markdown('<div class="container">', unsafe_allow_html=True)
|
| 145 |
|
| 146 |
-
st.markdown('<div>', unsafe_allow_html=True)
|
| 147 |
processed_image = change_hair_to_blonde(image)
|
| 148 |
st.image(processed_image, use_column_width=True)
|
| 149 |
st.markdown('<div class="custom-caption-2">์๋ณธ ์ด๋ฏธ์ง๋ฅผ ๋ฅํ์ดํฌ ๋ชจ๋ธ์ ๋ฃ์์ ๊ฒฝ์ฐ</div>', unsafe_allow_html=True)
|
| 150 |
st.markdown("<span>์ดํด๋ฅผ ๋๊ธฐ ์ํด ์ฌ์ง์ ๋
ธ๋์์ ์
ํ๋ ๋ฅํ์ดํฌ ์๊ณ ๋ฆฌ์ฆ ์ ์ฉ. ์๋ณธ ์ด๋ฏธ์ง๋ ๋ฅํ์ดํฌ ์๊ณ ๋ฆฌ์ฆ์ ์ํฅ์ ๋ฐ์.</span>", unsafe_allow_html=True)
|
| 151 |
st.markdown('</div>', unsafe_allow_html=True)
|
| 152 |
|
| 153 |
-
st.markdown('<div>', unsafe_allow_html=True)
|
| 154 |
deepfake_image = add_noise(image)
|
| 155 |
st.image(deepfake_image, use_column_width=True)
|
| 156 |
st.markdown('<div class="custom-caption-2">์ฌ์ ๋ฐฉ์ง ํํฐ ์ด๋ฏธ์ง๋ฅผ ๋ฅํ์ดํฌ ๋ชจ๋ธ์ ๋ฃ์์ ๊ฒฝ์ฐ</div>', unsafe_allow_html=True)
|
|
@@ -163,3 +171,6 @@ if uploaded_file is not None:
|
|
| 163 |
st.markdown('<p class="survey">์ ์๋น์ค๋ฅผ ์ฌ์ฉํด ๋ณด์
จ๊ฑฐ๋, ์ ํฌ ๊ธฐ์ ์ ์๋ฆฌ์ ๊ด์ฌ์ด ์์ผ์ ๋ถ๋ค๊ป์ ์๋์ ๊ฐ๋จํ ์ธํฐ๋ทฐ์ ์ฐธ์ฌํด ์ฃผ์๋ฉด ์ง์ฌ์ผ๋ก ๊ฐ์ฌ๋๋ฆฌ๊ฒ ์ต๋๋ค.</p>', unsafe_allow_html=True)
|
| 164 |
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)
|
| 165 |
st.markdown('<p class="survey-2">์๋น์ค๋ฅผ ์ด์ฉํด ์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค! ์ข์ ํ๋ฃจ ๋ณด๋ด์ธ์!</p>', unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
justify-items: center;
|
| 33 |
}
|
| 34 |
|
| 35 |
+
.custom-caption-1, .custom-caption-2, .survey, .survey-1, .survey-2 {
|
| 36 |
font-size: 20px;
|
| 37 |
font-weight: bold;
|
| 38 |
text-align: center;
|
| 39 |
margin-top: 10px;
|
| 40 |
+
color: black;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
.bottom-space {
|
| 44 |
+
height: 5em; /* ์ฌ๋ฐฑ์ ์ํ ๊ณต๊ฐ */
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
.center-align {
|
| 48 |
+
text-align: center;
|
| 49 |
}
|
| 50 |
|
| 51 |
@media only screen and (max-width: 768px) {
|
|
|
|
| 134 |
|
| 135 |
st.markdown('<div class="container">', unsafe_allow_html=True)
|
| 136 |
|
| 137 |
+
st.markdown('<div class="center-align">', unsafe_allow_html=True)
|
| 138 |
st.image(image, use_column_width=True)
|
| 139 |
st.markdown('<div class="custom-caption-1">์
๋ก๋ํ ์ด๋ฏธ์ง</div>', unsafe_allow_html=True)
|
| 140 |
st.markdown('</div>', unsafe_allow_html=True)
|
| 141 |
|
| 142 |
+
st.markdown('<div class="center-align">', unsafe_allow_html=True)
|
| 143 |
st.image(image, use_column_width=True)
|
| 144 |
st.markdown('<div class="custom-caption-1">ํํฐ๋ฅผ ์
ํ ์ด๋ฏธ์ง</div>', unsafe_allow_html=True)
|
| 145 |
st.markdown('</div>', unsafe_allow_html=True)
|
| 146 |
|
| 147 |
st.markdown('</div>', unsafe_allow_html=True)
|
| 148 |
|
| 149 |
+
button_clicked = st.button("์๋จ์ ๋ ์ฌ์ง์ ๋ฅํ์ดํฌ ๋ชจ๋ธ์ ํ์ต์ํค๊ธฐ", key="deepfake_button")
|
| 150 |
|
| 151 |
if button_clicked:
|
| 152 |
st.markdown('<div class="container">', unsafe_allow_html=True)
|
| 153 |
|
| 154 |
+
st.markdown('<div class="center-align">', unsafe_allow_html=True)
|
| 155 |
processed_image = change_hair_to_blonde(image)
|
| 156 |
st.image(processed_image, use_column_width=True)
|
| 157 |
st.markdown('<div class="custom-caption-2">์๋ณธ ์ด๋ฏธ์ง๋ฅผ ๋ฅํ์ดํฌ ๋ชจ๋ธ์ ๋ฃ์์ ๊ฒฝ์ฐ</div>', unsafe_allow_html=True)
|
| 158 |
st.markdown("<span>์ดํด๋ฅผ ๋๊ธฐ ์ํด ์ฌ์ง์ ๋
ธ๋์์ ์
ํ๋ ๋ฅํ์ดํฌ ์๊ณ ๋ฆฌ์ฆ ์ ์ฉ. ์๋ณธ ์ด๋ฏธ์ง๋ ๋ฅํ์ดํฌ ์๊ณ ๋ฆฌ์ฆ์ ์ํฅ์ ๋ฐ์.</span>", unsafe_allow_html=True)
|
| 159 |
st.markdown('</div>', unsafe_allow_html=True)
|
| 160 |
|
| 161 |
+
st.markdown('<div class="center-align">', unsafe_allow_html=True)
|
| 162 |
deepfake_image = add_noise(image)
|
| 163 |
st.image(deepfake_image, use_column_width=True)
|
| 164 |
st.markdown('<div class="custom-caption-2">์ฌ์ ๋ฐฉ์ง ํํฐ ์ด๋ฏธ์ง๋ฅผ ๋ฅํ์ดํฌ ๋ชจ๋ธ์ ๋ฃ์์ ๊ฒฝ์ฐ</div>', unsafe_allow_html=True)
|
|
|
|
| 171 |
st.markdown('<p class="survey">์ ์๋น์ค๋ฅผ ์ฌ์ฉํด ๋ณด์
จ๊ฑฐ๋, ์ ํฌ ๊ธฐ์ ์ ์๋ฆฌ์ ๊ด์ฌ์ด ์์ผ์ ๋ถ๋ค๊ป์ ์๋์ ๊ฐ๋จํ ์ธํฐ๋ทฐ์ ์ฐธ์ฌํด ์ฃผ์๋ฉด ์ง์ฌ์ผ๋ก ๊ฐ์ฌ๋๋ฆฌ๊ฒ ์ต๋๋ค.</p>', unsafe_allow_html=True)
|
| 172 |
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)
|
| 173 |
st.markdown('<p class="survey-2">์๋น์ค๋ฅผ ์ด์ฉํด ์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค! ์ข์ ํ๋ฃจ ๋ณด๋ด์ธ์!</p>', unsafe_allow_html=True)
|
| 174 |
+
|
| 175 |
+
# ์ฌ๋ฐฑ์ ์ถ๊ฐ
|
| 176 |
+
st.markdown('<div class="bottom-space"></div>', unsafe_allow_html=True)
|