Update app.py
Browse files"ํ๊ตญ์ด๋ก"
app.py
CHANGED
|
@@ -51,26 +51,26 @@ def apply_deepfake(image):
|
|
| 51 |
result = pipe(prompt, init_image=image, strength=0.75)
|
| 52 |
return result.images[0]
|
| 53 |
|
| 54 |
-
st.title("
|
| 55 |
|
| 56 |
-
uploaded_file = st.file_uploader("
|
| 57 |
|
| 58 |
if uploaded_file is not None:
|
| 59 |
image = Image.open(uploaded_file)
|
| 60 |
-
st.image(image, caption='
|
| 61 |
st.write("")
|
| 62 |
-
st.write("
|
| 63 |
|
| 64 |
-
action = st.radio("
|
| 65 |
|
| 66 |
if action == 'A':
|
| 67 |
# Just display the original image
|
| 68 |
-
st.image(image, caption='
|
| 69 |
elif action == 'B':
|
| 70 |
# Add dark noise to the original image
|
| 71 |
dark_noisy_image = add_dark_noise(image)
|
| 72 |
-
st.image(dark_noisy_image, caption='
|
| 73 |
-
elif action == '
|
| 74 |
# Apply deepfake transformation
|
| 75 |
deepfake_image = apply_deepfake(image)
|
| 76 |
-
st.image(deepfake_image, caption='
|
|
|
|
| 51 |
result = pipe(prompt, init_image=image, strength=0.75)
|
| 52 |
return result.images[0]
|
| 53 |
|
| 54 |
+
st.title("์ด๋ฏธ์ง ์ฒ๋ฆฌ MVP")
|
| 55 |
|
| 56 |
+
uploaded_file = st.file_uploader("์ด๋ฏธ์ง๋ฅผ ์ ํํ์ธ์...", type=["jpg", "png", "jpeg"])
|
| 57 |
|
| 58 |
if uploaded_file is not None:
|
| 59 |
image = Image.open(uploaded_file)
|
| 60 |
+
st.image(image, caption='์
๋ก๋๋ ์ด๋ฏธ์ง', use_column_width=True)
|
| 61 |
st.write("")
|
| 62 |
+
st.write("์ฒ๋ฆฌ ์ค...")
|
| 63 |
|
| 64 |
+
action = st.radio("์์
์ ์ ํํ์ธ์:", ('A', 'B', '๋ฅํ์ดํฌ'))
|
| 65 |
|
| 66 |
if action == 'A':
|
| 67 |
# Just display the original image
|
| 68 |
+
st.image(image, caption='์๋ณธ ์ด๋ฏธ์ง', use_column_width=True)
|
| 69 |
elif action == 'B':
|
| 70 |
# Add dark noise to the original image
|
| 71 |
dark_noisy_image = add_dark_noise(image)
|
| 72 |
+
st.image(dark_noisy_image, caption='์ด๋์ด ๋
ธ์ด์ฆ๊ฐ ์ถ๊ฐ๋ ์ด๋ฏธ์ง', use_column_width=True)
|
| 73 |
+
elif action == '๋ฅํ์ดํฌ':
|
| 74 |
# Apply deepfake transformation
|
| 75 |
deepfake_image = apply_deepfake(image)
|
| 76 |
+
st.image(deepfake_image, caption='๋ฅํ์ดํฌ ์ด๋ฏธ์ง', use_column_width=True)
|