Update app.py
Browse files
app.py
CHANGED
@@ -7,21 +7,6 @@ from PIL import Image, ExifTags
|
|
7 |
# ๊ฐ์ฅ ๋จผ์ set_page_config() ํธ์ถ
|
8 |
st.set_page_config(page_title="๋ฅํ์ดํฌ ์ฌ์ ๋ฐฉ์ง ํํฐ(ํ
์คํธ)", layout="wide")
|
9 |
|
10 |
-
|
11 |
-
ga_code = """
|
12 |
-
<!-- Global site tag (gtag.js) - Google Analytics -->
|
13 |
-
<script async src="https://www.googletagmanager.com/gtag/js?id=G-PZPBGNENQG"></script>
|
14 |
-
<script>
|
15 |
-
window.dataLayer = window.dataLayer || [];
|
16 |
-
function gtag(){dataLayer.push(arguments);}
|
17 |
-
gtag('js', new Date());
|
18 |
-
gtag('config', 'G-PZPBGNENQG');
|
19 |
-
</script>
|
20 |
-
"""
|
21 |
-
|
22 |
-
# Streamlit์ GA ์ฝ๋ ์ฝ์
|
23 |
-
components.html(ga_code, height=0)
|
24 |
-
|
25 |
# ๋๋จธ์ง Streamlit ์ฝ๋
|
26 |
st.title("๋ฅํ์ดํฌ ์ฌ์ ๋ฐฉ์ง ํํฐ(ํ
์คํธ)")
|
27 |
st.markdown("")
|
@@ -147,8 +132,6 @@ st.markdown(
|
|
147 |
font-size: 18px;
|
148 |
}
|
149 |
}
|
150 |
-
|
151 |
-
}
|
152 |
</style>
|
153 |
""",
|
154 |
unsafe_allow_html=True,
|
@@ -216,17 +199,14 @@ if uploaded_file is not None:
|
|
216 |
|
217 |
with col1:
|
218 |
st.image(image, use_column_width=True)
|
219 |
-
st.markdown('<div class="custom-caption-1">์
๋ก๋ํ ์ด๋ฏธ์ง</div>', unsafe_allow_html=True)
|
220 |
|
221 |
with col2:
|
222 |
st.image(image, use_column_width=True)
|
223 |
st.markdown('<div class="custom-caption-1">ํํฐ๋ฅผ ์
ํ ์ด๋ฏธ์ง</div>', unsafe_allow_html=True)
|
224 |
|
225 |
button_clicked = st.button("์๋จ์ ๋ ์ฌ์ง์ ๋ฅํ์ดํฌ ๋ชจ๋ธ์ ํ์ต์ํค๊ธฐ")
|
226 |
-
|
227 |
-
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)
|
228 |
-
st.markdown('<p class="survey-2">์๋น์ค๋ฅผ ์ด์ฉํด ์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค! ์ข์ ํ๋ฃจ ๋ณด๋ด์ธ์!</p>', unsafe_allow_html=True)
|
229 |
-
|
230 |
if button_clicked:
|
231 |
with col1:
|
232 |
processed_image = change_hair_to_blonde(image)
|
@@ -237,5 +217,11 @@ if uploaded_file is not None:
|
|
237 |
with col2:
|
238 |
deepfake_image = add_noise(image)
|
239 |
st.image(deepfake_image, use_column_width=True)
|
240 |
-
st.markdown('<div class="custom-caption-2"
|
241 |
st.markdown("<span>์ฌ์ ๋ฐฉ์ง ํํฐ๋ฅผ ์
ํ ์ด๋ฏธ์ง๋ ๋ฅํ์ดํฌ ์๊ณ ๋ฆฌ์ฆ์ ์ํฅ์ ๋ฐ์ง ์๊ณ ๋
ธ์ด์ฆ ์ฒ๋ฆฌ๊ฐ ๋์ด ์์๋ณด๊ธฐ ํ๋ ์ฌ์ง์ ์ถ๋ ฅ. ์ฆ, ๋ฅํ์ดํฌ ์ฌ์ง ํฉ์ฑ์ ๋ฐฉํดํจ.</span>", unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
# ๊ฐ์ฅ ๋จผ์ set_page_config() ํธ์ถ
|
8 |
st.set_page_config(page_title="๋ฅํ์ดํฌ ์ฌ์ ๋ฐฉ์ง ํํฐ(ํ
์คํธ)", layout="wide")
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
# ๋๋จธ์ง Streamlit ์ฝ๋
|
11 |
st.title("๋ฅํ์ดํฌ ์ฌ์ ๋ฐฉ์ง ํํฐ(ํ
์คํธ)")
|
12 |
st.markdown("")
|
|
|
132 |
font-size: 18px;
|
133 |
}
|
134 |
}
|
|
|
|
|
135 |
</style>
|
136 |
""",
|
137 |
unsafe_allow_html=True,
|
|
|
199 |
|
200 |
with col1:
|
201 |
st.image(image, use_column_width=True)
|
202 |
+
st.markdown('<div class="custom-caption-1">์
๋ก๋ํ ์๋ณธ ์ด๋ฏธ์ง</div>', unsafe_allow_html=True)
|
203 |
|
204 |
with col2:
|
205 |
st.image(image, use_column_width=True)
|
206 |
st.markdown('<div class="custom-caption-1">ํํฐ๋ฅผ ์
ํ ์ด๋ฏธ์ง</div>', unsafe_allow_html=True)
|
207 |
|
208 |
button_clicked = st.button("์๋จ์ ๋ ์ฌ์ง์ ๋ฅํ์ดํฌ ๋ชจ๋ธ์ ํ์ต์ํค๊ธฐ")
|
209 |
+
|
|
|
|
|
|
|
210 |
if button_clicked:
|
211 |
with col1:
|
212 |
processed_image = change_hair_to_blonde(image)
|
|
|
217 |
with col2:
|
218 |
deepfake_image = add_noise(image)
|
219 |
st.image(deepfake_image, use_column_width=True)
|
220 |
+
st.markdown('<div class="custom-caption-2">๋ฐฉ์ง ํํฐ ์ด๋ฏธ์ง๋ฅผ ๋ฅํ์ดํฌ ๋ชจ๋ธ์ ๋ฃ์์ ๊ฒฝ์ฐ</div>', unsafe_allow_html=True)
|
221 |
st.markdown("<span>์ฌ์ ๋ฐฉ์ง ํํฐ๋ฅผ ์
ํ ์ด๋ฏธ์ง๋ ๋ฅํ์ดํฌ ์๊ณ ๋ฆฌ์ฆ์ ์ํฅ์ ๋ฐ์ง ์๊ณ ๋
ธ์ด์ฆ ์ฒ๋ฆฌ๊ฐ ๋์ด ์์๋ณด๊ธฐ ํ๋ ์ฌ์ง์ ์ถ๋ ฅ. ์ฆ, ๋ฅํ์ดํฌ ์ฌ์ง ํฉ์ฑ์ ๋ฐฉํดํจ.</span>", unsafe_allow_html=True)
|
222 |
+
|
223 |
+
st.markdown('<p class="survey">์ ์๋น์ค๋ฅผ ์ฌ์ฉํด ๋ณด์
จ๊ฑฐ๋, ์ ํฌ ๊ธฐ์ ์ ์๋ฆฌ์ ๊ด์ฌ์ด ์์ผ์ ๋ถ๋ค๊ป์ ์๋์ ๊ฐ๋จํ ์ธํฐ๋ทฐ์ ์ฐธ์ฌํด ์ฃผ์๋ฉด ์ง์ฌ์ผ๋ก ๊ฐ์ฌ๋๋ฆฌ๊ฒ ์ต๋๋ค.</p>', unsafe_allow_html=True)
|
224 |
+
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)
|
225 |
+
st.markdown('<p class="survey-2">์๋น์ค๋ฅผ ์ด์ฉํด ์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค! ์ข์ ํ๋ฃจ ๋ณด๋ด์ธ์!</p>', unsafe_allow_html=True)
|
226 |
+
|
227 |
+
|