minhwai commited on
Commit
a2ec5a9
ยท
verified ยท
1 Parent(s): 578cb4f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -7
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: white;
 
 
 
 
 
 
 
 
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)