Update app.py
Browse files
app.py
CHANGED
@@ -908,159 +908,165 @@ user_manual_html = """
|
|
908 |
</div>
|
909 |
"""
|
910 |
|
911 |
-
#
|
912 |
-
with gr.
|
913 |
-
gr.HTML(
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
<span style="font-size: 1.1rem; font-weight: 600; color: #5561e9;">2๏ธโฃ ํ๋กฌํํธ ์
๋ ฅ ๋๋ ๋ฒํผ ์ ํ</span><br>
|
924 |
-
๋ณํํ๊ณ ์ถ์ ๋ด์ฉ์ ์ง์ ์
๋ ฅํ๊ฑฐ๋, ๋ฏธ๋ฆฌ ์ ์๋ ๋ฒํผ ์ค ํ๋๋ฅผ ์ ํํ์ธ์.<br><br>
|
925 |
|
926 |
-
<
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
</ul>
|
940 |
|
941 |
-
<div class="
|
942 |
-
<i class="fas fa-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
943 |
</div>
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
</div>
|
990 |
</div>
|
991 |
-
</div>
|
992 |
-
</div>
|
993 |
-
|
994 |
-
<div class="manual-section">
|
995 |
-
<div class="manual-section-title"><i class="fas fa-search-plus"></i> ์ด๋ฏธ์ง ์
์ค์ผ์ผ๋ฌ</div>
|
996 |
-
<p class="manual-text">
|
997 |
-
<span style="font-size: 1.1rem; font-weight: 600; color: #5561e9;">์ด๋ฏธ์ง ๊ฐ์ ๊ธฐ๋ฅ</span><br>
|
998 |
-
์ ํด์๋ ์ด๋ฏธ์ง๋ฅผ ๊ณ ํด์๋๋ก ๋ณํํ๊ณ , ์ผ๊ตด์ ์์ฐ์ค๋ฝ๊ฒ ๋ณต์ํฉ๋๋ค.<br>
|
999 |
-
ํนํ ๋ค์๊ณผ ๊ฐ์ ๊ฒฝ์ฐ์ ํจ๊ณผ์ ์
๋๋ค:
|
1000 |
-
<ul>
|
1001 |
-
<li>ํด์๋๊ฐ ๋ฎ์ ์ด๋ฏธ์ง ๊ฐ์ </li>
|
1002 |
-
<li>ํ๋ฆฟํ๊ฑฐ๋ ๋
ธ์ด์ฆ๊ฐ ์๋ ์ผ๊ตด ๋ณต์</li>
|
1003 |
-
<li>์ด๋ฏธ์ง ์ ๋ฐ์ ์ธ ์ ๋ช
๋ ํฅ์</li>
|
1004 |
-
</ul>
|
1005 |
|
1006 |
-
<div class="
|
1007 |
-
<i class="fas fa-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1008 |
</div>
|
1009 |
-
</p>
|
1010 |
-
</div>
|
1011 |
-
|
1012 |
-
<div class="manual-section">
|
1013 |
-
<div class="manual-section-title"><i class="fas fa-cut"></i> ๋ฐฐ๊ฒฝ ์ง์ฐ๊ธฐ ๊ธฐ๋ฅ</div>
|
1014 |
-
<p class="manual-text">
|
1015 |
-
<span style="font-size: 1.1rem; font-weight: 600; color: #5561e9;">์๋ ๋ฐฐ๊ฒฝ ์ ๊ฑฐ</span><br>
|
1016 |
-
์ด๋ฏธ์ง์์ ๋ฐฐ๊ฒฝ์ ์๋์ผ๋ก ๊ฐ์งํ๊ณ ์ ๊ฑฐํ์ฌ ํฌ๋ช
ํ PNG ์ด๋ฏธ์ง๋ก ๋ณํํฉ๋๋ค.<br>
|
1017 |
-
์ฃผ์ ์ฌ์ฉ ์ฌ๋ก:
|
1018 |
-
<ul>
|
1019 |
-
<li>์ ํ ์ด๋ฏธ์ง์ ๋ฐฐ๊ฒฝ ์ ๊ฑฐ</li>
|
1020 |
-
<li>์ธ๋ฌผ ์ฌ์ง์์ ๋ฐฐ๊ฒฝ ๋ถ๋ฆฌ</li>
|
1021 |
-
<li>์ฌ๋ฌ ์ด๋ฏธ์ง ํฉ์ฑ์ ์ํ ์ค๋น</li>
|
1022 |
-
</ul>
|
1023 |
|
1024 |
-
<div class="
|
1025 |
-
<i class="fas fa-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1026 |
</div>
|
1027 |
-
</p>
|
1028 |
-
</div>
|
1029 |
-
|
1030 |
-
<div class="manual-section">
|
1031 |
-
<div class="manual-section-title"><i class="fas fa-sliders-h"></i> ์ด๋ฏธ์ง ํํฐ ๊ธฐ๋ฅ</div>
|
1032 |
-
<p class="manual-text">
|
1033 |
-
<span style="font-size: 1.1rem; font-weight: 600; color: #5561e9;">์ด๋ฏธ์ง ํธ์ง ๋๊ตฌ</span><br>
|
1034 |
-
์ด๋ฏธ์ง ํํฐ ํญ์์๋ ๋ค์ํ ์ฌ๋ผ์ด๋๋ฅผ ์ฌ์ฉํ์ฌ ์ด๋ฏธ์ง๋ฅผ ์ฝ๊ฒ ํธ์งํ ์ ์์ต๋๋ค.<br>
|
1035 |
-
์ฃผ์ ๊ธฐ๋ฅ:
|
1036 |
-
<ul>
|
1037 |
-
<li>๋ฐ๊ธฐ, ๋๋น, ์ฑ๋, ์์จ๋ ๋ฑ ๋ค์ํ ์กฐ์ ์ต์
</li>
|
1038 |
-
<li>๋ชจ๋ ๋ณ๊ฒฝ์ฌํญ ์ค์๊ฐ ๋ฏธ๋ฆฌ๋ณด๊ธฐ</li>
|
1039 |
-
<li>ํธ์ง ์๋ฃ ํ JPG ํ์์ผ๋ก ์ ์ฅ ๊ฐ๋ฅ</li>
|
1040 |
-
</ul>
|
1041 |
|
1042 |
-
<div class="
|
1043 |
-
<i class="fas fa-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1044 |
</div>
|
1045 |
-
</
|
1046 |
-
|
1047 |
|
1048 |
-
<div class="manual-section">
|
1049 |
-
<div class="manual-section-title"><i class="fas fa-question-circle"></i> ์์ฃผ ๋ฌป๋ ์ง๋ฌธ</div>
|
1050 |
-
<p class="manual-text">
|
1051 |
-
<strong style="font-size: 1.1rem; color: #5561e9;">Q: ์ด๋ค ํ์์ ์ด๋ฏธ์ง๋ฅผ ์
๋ก๋ํ ์ ์๋์?</strong><br>
|
1052 |
-
A: JPG, PNG, WEBP ๋ฑ ๋๋ถ๋ถ์ ์ผ๋ฐ์ ์ธ ์ด๋ฏธ์ง ํ์์ ์ง์ํฉ๋๋ค.<br><br>
|
1053 |
-
|
1054 |
-
<strong style="font-size: 1.1rem; color: #5561e9;">Q: ์ด๋ฏธ์ง ์์ฑ ๋ฐ ์ฒ๋ฆฌ์ ์ผ๋ง๋ ์๊ฐ์ด ๊ฑธ๋ฆฌ๋์?</strong><br>
|
1055 |
-
A: ์ผ๋ฐ์ ์ผ๋ก 10-30์ด ์ ๋ ์์๋๋ฉฐ, ์ด๋ฏธ์ง ํฌ๊ธฐ์ ๋ณต์ก๋์ ๋ฐ๋ผ ๋ฌ๋ผ์ง ์ ์์ต๋๋ค.<br><br>
|
1056 |
-
|
1057 |
-
<strong style="font-size: 1.1rem; color: #5561e9;">Q: ์์ฑ๋ ์ด๋ฏธ์ง๋ฅผ ์ด๋ป๊ฒ ์ ์ฅํ ์ ์๋์?</strong><br>
|
1058 |
-
A: ์์ฑ๋ ์ด๋ฏธ์ง์ ๋ง์ฐ์ค ์ค๋ฅธ์ชฝ ๋ฒํผ์ ํด๋ฆญํ์ฌ '์ด๋ฏธ์ง ์ ๏ฟฝ๏ฟฝ๏ฟฝ' ์ต์
์ ์ ํํ๋ฉด ๋ฉ๋๋ค.
|
1059 |
-
</p>
|
1060 |
-
</div>
|
1061 |
-
</div>
|
1062 |
-
""")
|
1063 |
-
|
1064 |
with gr.TabItem("โจ ์ด์ปค๋จธ์ค ์ด๋ฏธ์ง ์์ฑ๊ธฐ", elem_classes="tab-content"):
|
1065 |
with gr.Row(equal_height=True):
|
1066 |
with gr.Column(scale=1):
|
@@ -1129,7 +1135,7 @@ with gr.TabItem("๐ ์ฌ์ฉ ์ค๋ช
์", elem_classes="tab-content"):
|
|
1129 |
examples=examples,
|
1130 |
inputs=[image1_input, image2_input, image3_input, prompt_input]
|
1131 |
)
|
1132 |
-
|
1133 |
with gr.TabItem("๐ ์ด๋ฏธ์ง ์
์ค์ผ์ผ๋ฌ", elem_classes="tab-content"):
|
1134 |
with gr.Row():
|
1135 |
with gr.Column(elem_classes="panel"):
|
@@ -1180,9 +1186,8 @@ with gr.TabItem("๐ ์ฌ์ฉ ์ค๋ช
์", elem_classes="tab-content"):
|
|
1180 |
with gr.Row():
|
1181 |
bg_remove_status = gr.Textbox(label="์ํ", lines=2, elem_classes="custom-input")
|
1182 |
bg_remove_btn = gr.Button('โ๏ธ ๋ฐฐ๊ฒฝ ์ ๊ฑฐํ๊ธฐ', elem_classes="custom-button primary")
|
1183 |
-
|
1184 |
-
|
1185 |
-
# UI ๊ตฌ์ฑ์ ์ด๋ฏธ์ง ํํฐ ํญ ์ถ๊ฐ (๊ธฐ์กด ํญ ๋ค์์ ์ถ๊ฐ)
|
1186 |
with gr.TabItem("๐๏ธ ์ด๋ฏธ์ง ํํฐ", elem_classes="tab-content"):
|
1187 |
with gr.Row(equal_height=True):
|
1188 |
# ์ผ์ชฝ ์ด: ๋น์จ 3
|
@@ -1190,7 +1195,7 @@ with gr.TabItem("๐ ์ฌ์ฉ ์ค๋ช
์", elem_classes="tab-content"):
|
|
1190 |
gr.HTML('<div class="section-title"><i class="fas fa-sliders-h"></i> ์ด๋ฏธ์ง ํํฐ ์ค์ </div>')
|
1191 |
# ์ด๋ฏธ์ง ์
๋ก๋
|
1192 |
filter_input_image = gr.Image(type="pil", label="์ด๋ฏธ์ง ์
๋ก๋", elem_classes="image-container")
|
1193 |
-
|
1194 |
# ์กฐ์ ์ฌ๋ผ์ด๋
|
1195 |
with gr.Group():
|
1196 |
brightness_slider = gr.Slider(0.0, 2.0, value=1.0, step=0.1, label="๋ฐ๊ธฐ ์กฐ์ ")
|
@@ -1202,19 +1207,19 @@ with gr.TabItem("๐ ์ฌ์ฉ ์ค๋ช
์", elem_classes="tab-content"):
|
|
1202 |
vibrance_slider = gr.Slider(-100.0, 100.0, value=0.0, step=1.0, label="ํ๊ธฐ ์กฐ์ ")
|
1203 |
color_mixer_blues_slider = gr.Slider(-100.0, 100.0, value=0.0, step=1.0, label="์ปฌ๋ฌ ๋ฏน์ (๋ธ๋ฃจ)")
|
1204 |
shadows_slider = gr.Slider(-100.0, 100.0, value=0.0, step=1.0, label="๊ทธ๋ฆผ์ ์กฐ์ ")
|
1205 |
-
|
1206 |
# ์ค๋ฅธ์ชฝ ์ด: ๋น์จ 7
|
1207 |
with gr.Column(scale=7, elem_classes="panel"):
|
1208 |
gr.HTML('<div class="section-title"><i class="fas fa-image"></i> ํํฐ ์ ์ฉ ๊ฒฐ๊ณผ</div>')
|
1209 |
# ์ฒ๋ฆฌ๋ ์ด๋ฏธ์ง ์ถ๋ ฅ
|
1210 |
filter_output_image = gr.Image(type="pil", label="์ฒ๋ฆฌ๋ ์ด๋ฏธ์ง", elem_classes="image-container")
|
1211 |
-
|
1212 |
# ๋ณํ๋ ์ด๋ฏธ์ง ๋ค์ด๋ก๋ ๋ฒํผ
|
1213 |
with gr.Row():
|
1214 |
gr.HTML('<div class="section-title"><i class="fas fa-download"></i> ์ด๋ฏธ์ง ์ ์ฅ</div>')
|
1215 |
download_button = gr.Button("JPG๋ก ๋ณํํ๊ธฐ", elem_classes="custom-button primary")
|
1216 |
download_output = gr.File(label="JPG ์ด๋ฏธ์ง ๋ค์ด๋ก๋")
|
1217 |
-
|
1218 |
# ์ด๋ฏธ์ง ์ฒ๋ฆฌ ํจ์ ์ฐ๊ฒฐ
|
1219 |
inputs = [
|
1220 |
filter_input_image,
|
@@ -1228,7 +1233,7 @@ with gr.TabItem("๐ ์ฌ์ฉ ์ค๋ช
์", elem_classes="tab-content"):
|
|
1228 |
color_mixer_blues_slider,
|
1229 |
shadows_slider
|
1230 |
]
|
1231 |
-
|
1232 |
input_components = [
|
1233 |
brightness_slider,
|
1234 |
contrast_slider,
|
@@ -1240,20 +1245,20 @@ with gr.TabItem("๐ ์ฌ์ฉ ์ค๋ช
์", elem_classes="tab-content"):
|
|
1240 |
color_mixer_blues_slider,
|
1241 |
shadows_slider
|
1242 |
]
|
1243 |
-
|
1244 |
for input_component in input_components:
|
1245 |
input_component.change(
|
1246 |
fn=process_image,
|
1247 |
inputs=inputs,
|
1248 |
outputs=filter_output_image
|
1249 |
)
|
1250 |
-
|
1251 |
filter_input_image.change(
|
1252 |
fn=lambda x, *args: process_image(x, *args) if x is not None else None,
|
1253 |
inputs=inputs,
|
1254 |
outputs=filter_output_image
|
1255 |
)
|
1256 |
-
|
1257 |
# ๋ค์ด๋ก๋ ๋ฒํผ ๊ธฐ๋ฅ
|
1258 |
download_button.click(
|
1259 |
fn=download_image,
|
|
|
908 |
</div>
|
909 |
"""
|
910 |
|
911 |
+
# UI ๊ตฌ์ฑ
|
912 |
+
with gr.Blocks(css=custom_css) as demo:
|
913 |
+
gr.HTML(fontawesome_link)
|
914 |
+
gr.HTML(header_html)
|
915 |
+
|
916 |
+
with gr.Tabs(elem_classes="custom-tabs") as tabs:
|
917 |
+
# ์ฌ์ฉ ์ค๋ช
์ ํญ์ ์ฒซ ๋ฒ์งธ๋ก ๋ฐฐ์น
|
918 |
+
with gr.TabItem("๐ ์ฌ์ฉ ์ค๋ช
์", elem_classes="tab-content"):
|
919 |
+
gr.HTML("""
|
920 |
+
<div class="user-manual">
|
921 |
+
<div class="manual-title"><i class="fas fa-book"></i> ์ฌ์ฉ ์ค๋ช
์</div>
|
|
|
|
|
|
|
922 |
|
923 |
+
<div class="manual-section">
|
924 |
+
<div class="manual-section-title"><i class="fas fa-magic"></i> ์ด์ปค๋จธ์ค์ ์ฉ ์ด๋ฏธ์ง ์์ฑ๊ธฐ</div>
|
925 |
+
<p class="manual-text">
|
926 |
+
<span style="font-size: 1.1rem; font-weight: 600; color: #5561e9;">1๏ธโฃ ์ด๋ฏธ์ง ์
๋ก๋</span><br>
|
927 |
+
์ต๋ 3๊ฐ์ ์ด๋ฏธ์ง๋ฅผ ์
๋ก๋ํ ์ ์์ต๋๋ค. ์ฒซ ๋ฒ์งธ ์ด๋ฏธ์ง๋ ํ์์
๋๋ค.<br><br>
|
928 |
+
|
929 |
+
<span style="font-size: 1.1rem; font-weight: 600; color: #5561e9;">2๏ธโฃ ํ๋กฌํํธ ์
๋ ฅ ๋๋ ๋ฒํผ ์ ํ</span><br>
|
930 |
+
๋ณํํ๊ณ ์ถ์ ๋ด์ฉ์ ์ง์ ์
๋ ฅํ๊ฑฐ๋, ๋ฏธ๋ฆฌ ์ ์๋ ๋ฒํผ ์ค ํ๋๋ฅผ ์ ํํ์ธ์.<br><br>
|
931 |
+
|
932 |
+
<span style="font-size: 1.1rem; font-weight: 600; color: #5561e9;">3๏ธโฃ ์ด๋ฏธ์ง ์์ฑ</span><br>
|
933 |
+
'์ด๋ฏธ์ง ์์ฑ (1์ฅ)' ๋ฒํผ์ ํด๋ฆญํ๋ฉด 1๊ฐ์ ์ด๋ฏธ์ง๊ฐ, '์ด๋ฏธ์ง ์์ฑ (4์ฅ)' ๋ฒํผ์ ํด๋ฆญํ๋ฉด 4๊ฐ์ง ๋ฒ์ ์ ์ด๋ฏธ์ง๊ฐ ์์ฑ๋ฉ๋๋ค.
|
934 |
+
</p>
|
935 |
+
</div>
|
|
|
936 |
|
937 |
+
<div class="manual-section">
|
938 |
+
<div class="manual-section-title"><i class="fas fa-hashtag"></i> ์ด๋ฏธ์ง ์ฐธ์กฐ ๋ฐฉ๋ฒ</div>
|
939 |
+
<p class="manual-text">
|
940 |
+
ํ๋กฌํํธ์์ ๋ค์ ํ๊ทธ๋ฅผ ์ฌ์ฉํ์ฌ ๊ฐ ์ด๋ฏธ์ง๋ฅผ ์ฐธ์กฐํ ์ ์์ต๋๋ค:
|
941 |
+
<ul>
|
942 |
+
<li><strong style="font-size: 1.05rem;">#1</strong> - ์ฒซ ๋ฒ์งธ ์ด๋ฏธ์ง</li>
|
943 |
+
<li><strong style="font-size: 1.05rem;">#2</strong> - ๋ ๋ฒ์งธ ์ด๋ฏธ์ง</li>
|
944 |
+
<li><strong style="font-size: 1.05rem;">#3</strong> - ์ธ ๋ฒ์งธ ์ด๋ฏธ์ง</li>
|
945 |
+
</ul>
|
946 |
+
|
947 |
+
<div class="tip-box">
|
948 |
+
<i class="fas fa-lightbulb"></i> <strong>ํ:</strong> ์๋ฅผ ๋ค์ด, "(#1์ ์ฌ์ฑ๋ชจ๋ธ)์ด (#2์ ์ ๊ธ๋ผ์ค)๋ฅผ ์ฐฉ์ฉํ ๋ชจ์ต"๊ณผ ๊ฐ์ด ์ฌ์ฉํ ์ ์์ต๋๋ค.
|
949 |
+
</div>
|
950 |
+
</p>
|
951 |
</div>
|
952 |
+
|
953 |
+
<div class="manual-section">
|
954 |
+
<div class="manual-section-title"><i class="fas fa-tools"></i> ์ฃผ์ ๊ธฐ๋ฅ</div>
|
955 |
+
<div class="manual-text">
|
956 |
+
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem;">
|
957 |
+
<div>
|
958 |
+
<p style="font-size: 1.1rem; font-weight: 600; color: #ff6b6b;"><i class="fas fa-exchange-alt"></i> ์ด๋ฏธ์ง ๋ณ๊ฒฝ</p>
|
959 |
+
ํฌ์ฆ๋ ์คํ์ผ์ ๋ณ๊ฒฝํ๋ฉด์ ์๋ณธ์ ์ฃผ์ ์์๋ ์ ์งํฉ๋๋ค.
|
960 |
+
</div>
|
961 |
+
|
962 |
+
<div>
|
963 |
+
<p style="font-size: 1.1rem; font-weight: 600; color: #ff6b6b;"><i class="fas fa-eraser"></i> ๊ธ์ ์ง์ฐ๊ธฐ/๋ณ๊ฒฝ</p>
|
964 |
+
์ด๋ฏธ์ง์ ํ
์คํธ๋ฅผ ์์ฐ์ค๋ฝ๊ฒ ์ ๊ฑฐํ๊ฑฐ๋ ๋ค๋ฅธ ํ
์คํธ๋ก ๋ณ๊ฒฝํฉ๋๋ค.
|
965 |
+
</div>
|
966 |
+
|
967 |
+
<div>
|
968 |
+
<p style="font-size: 1.1rem; font-weight: 600; color: #ff6b6b;"><i class="fas fa-tshirt"></i> ๊ฐ์ ์ํ์ฐฉ์ฉ</p>
|
969 |
+
๋ชจ๋ธ์๊ฒ ๋ค๋ฅธ ์ด๋ฏธ์ง์ ์ํ์ ์์ฐ์ค๋ฝ๊ฒ ์ฐฉ์ฉ์ํต๋๋ค.
|
970 |
+
</div>
|
971 |
+
|
972 |
+
<div>
|
973 |
+
<p style="font-size: 1.1rem; font-weight: 600; color: #ff6b6b;"><i class="fas fa-image"></i> ๋ฐฐ๊ฒฝ ๋ฐ๊พธ๊ธฐ</p>
|
974 |
+
์ฃผ์ ํผ์ฌ์ฒด๋ ์ ์งํ๋ฉฐ ๋ฐฐ๊ฒฝ๋ง ๊ต์ฒดํฉ๋๋ค.
|
975 |
+
</div>
|
976 |
+
|
977 |
+
<div>
|
978 |
+
<p style="font-size: 1.1rem; font-weight: 600; color: #ff6b6b;"><i class="fas fa-cut"></i> ๋ถ๋ถ ์ง์ฐ๊ธฐ</p>
|
979 |
+
์ด๋ฏธ์ง์ ํน์ ๋ถ๋ถ์ ์ง์ฐ๊ณ ๋ฐฐ๊ฒฝ๊ณผ ์์ฐ์ค๋ฝ๊ฒ ์กฐํ๋๋๋ก ์ฑ์๋๋ค.
|
980 |
+
</div>
|
981 |
+
|
982 |
+
<div>
|
983 |
+
<p style="font-size: 1.1rem; font-weight: 600; color: #ff6b6b;"><i class="fas fa-wine-glass"></i> ์ํ๋ค๊ณ ์๊ธฐ</p>
|
984 |
+
๋ชจ๋ธ์ด ์ํ์ ๋ค๊ณ ์๋ ์์ฐ์ค๋ฌ์ด ํฌ์ฆ์ ์ด๋ฏธ์ง๋ฅผ ์์ฑํฉ๋๋ค.
|
985 |
+
</div>
|
986 |
+
|
987 |
+
<div>
|
988 |
+
<p style="font-size: 1.1rem; font-weight: 600; color: #ff6b6b;"><i class="fas fa-expand-alt"></i> ์ด๋ฏธ์ง ํ์ฅ</p>
|
989 |
+
์๋ณธ ์ด๋ฏธ์ง ์ฃผ๋ณ์ ์์ฐ์ค๋ฝ๊ฒ ์ถ๊ฐ ์์ญ์ ์์ฑํ์ฌ ์ด๋ฏธ์ง๋ฅผ ํ์ฅํฉ๋๋ค.
|
990 |
+
</div>
|
991 |
+
|
992 |
+
<div>
|
993 |
+
<p style="font-size: 1.1rem; font-weight: 600; color: #ff6b6b;"><i class="fas fa-sliders-h"></i> ์ด๋ฏธ์ง ํํฐ</p>
|
994 |
+
๋ฐ๊ธฐ, ๋๋น, ์ฑ๋ ๋ฑ์ ์กฐ์ ํ์ฌ ์ด๋ฏธ์ง๋ฅผ ์ ๋ฌธ์ ์ผ๋ก ํธ์งํฉ๋๋ค.
|
995 |
+
</div>
|
996 |
+
</div>
|
997 |
</div>
|
998 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
999 |
|
1000 |
+
<div class="manual-section">
|
1001 |
+
<div class="manual-section-title"><i class="fas fa-search-plus"></i> ์ด๋ฏธ์ง ์
์ค์ผ์ผ๋ฌ</div>
|
1002 |
+
<p class="manual-text">
|
1003 |
+
<span style="font-size: 1.1rem; font-weight: 600; color: #5561e9;">์ด๋ฏธ์ง ๊ฐ์ ๊ธฐ๋ฅ</span><br>
|
1004 |
+
์ ํด์๋ ์ด๋ฏธ์ง๋ฅผ ๊ณ ํด์๋๋ก ๋ณํํ๊ณ , ์ผ๊ตด์ ์์ฐ์ค๋ฝ๊ฒ ๋ณต์ํฉ๋๋ค.<br>
|
1005 |
+
ํนํ ๋ค์๊ณผ ๊ฐ์ ๊ฒฝ์ฐ์ ํจ๊ณผ์ ์
๋๋ค:
|
1006 |
+
<ul>
|
1007 |
+
<li>ํด์๋๊ฐ ๋ฎ์ ์ด๋ฏธ์ง ๊ฐ์ </li>
|
1008 |
+
<li>ํ๋ฆฟํ๊ฑฐ๋ ๋
ธ์ด์ฆ๊ฐ ์๋ ์ผ๊ตด ๋ณต์</li>
|
1009 |
+
<li>์ด๋ฏธ์ง ์ ๋ฐ์ ์ธ ์ ๋ช
๋ ํฅ์</li>
|
1010 |
+
</ul>
|
1011 |
+
|
1012 |
+
<div class="tip-box">
|
1013 |
+
<i class="fas fa-lightbulb"></i> <strong>ํ:</strong> ์ด๋ฏธ์ง์ ํฌ๊ธฐ๊ฐ ์์์๋ก ์ฒ๋ฆฌ ์๋๊ฐ ๋น ๋ฆ
๋๋ค. ์ผ๊ตด์ด ํฌํจ๋ ์ด๋ฏธ์ง์์ ๊ฐ์ฅ ์ข์ ๊ฒฐ๊ณผ๋ฅผ ์ป์ ์ ์์ต๋๋ค.
|
1014 |
+
</div>
|
1015 |
+
</p>
|
1016 |
+
</div>
|
1017 |
+
|
1018 |
+
<div class="manual-section">
|
1019 |
+
<div class="manual-section-title"><i class="fas fa-cut"></i> ๋ฐฐ๊ฒฝ ์ง์ฐ๊ธฐ ๊ธฐ๋ฅ</div>
|
1020 |
+
<p class="manual-text">
|
1021 |
+
<span style="font-size: 1.1rem; font-weight: 600; color: #5561e9;">์๋ ๋ฐฐ๊ฒฝ ์ ๊ฑฐ</span><br>
|
1022 |
+
์ด๋ฏธ์ง์์ ๋ฐฐ๊ฒฝ์ ์๋์ผ๋ก ๊ฐ์งํ๊ณ ์ ๊ฑฐํ์ฌ ํฌ๋ช
ํ PNG ์ด๋ฏธ์ง๋ก ๋ณํํฉ๋๋ค.<br>
|
1023 |
+
์ฃผ์ ์ฌ์ฉ ์ฌ๋ก:
|
1024 |
+
<ul>
|
1025 |
+
<li>์ ํ ์ด๋ฏธ์ง์ ๋ฐฐ๊ฒฝ ์ ๊ฑฐ</li>
|
1026 |
+
<li>์ธ๋ฌผ ์ฌ์ง์์ ๋ฐฐ๊ฒฝ ๋ถ๋ฆฌ</li>
|
1027 |
+
<li>์ฌ๋ฌ ์ด๋ฏธ์ง ํฉ์ฑ์ ์ํ ์ค๋น</li>
|
1028 |
+
</ul>
|
1029 |
+
|
1030 |
+
<div class="tip-box">
|
1031 |
+
<i class="fas fa-lightbulb"></i> <strong>ํ:</strong> ๋ฐฐ๊ฒฝ๊ณผ ์ฃผ์ ํผ์ฌ์ฒด ๊ฐ์ ๋๋น๊ฐ ๋๋ ทํ ์๋ก ๋ ์ ํํ ๊ฒฐ๊ณผ๋ฅผ ์ป์ ์ ์์ต๋๋ค. ๋ณต์กํ ๋ฐฐ๊ฒฝ์ ๊ฒฝ์ฐ ๋ฏธ์ธ ์กฐ์ ์ด ํ์ํ ์ ์์ต๋๋ค.
|
1032 |
+
</div>
|
1033 |
+
</p>
|
1034 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1035 |
|
1036 |
+
<div class="manual-section">
|
1037 |
+
<div class="manual-section-title"><i class="fas fa-sliders-h"></i> ์ด๋ฏธ์ง ํํฐ ๊ธฐ๋ฅ</div>
|
1038 |
+
<p class="manual-text">
|
1039 |
+
<span style="font-size: 1.1rem; font-weight: 600; color: #5561e9;">์ด๋ฏธ์ง ํธ์ง ๋๊ตฌ</span><br>
|
1040 |
+
์ด๋ฏธ์ง ํํฐ ํญ์์๋ ๋ค์ํ ์ฌ๋ผ์ด๋๋ฅผ ์ฌ์ฉํ์ฌ ์ด๋ฏธ์ง๋ฅผ ์ฝ๊ฒ ํธ์งํ ์ ์์ต๋๋ค.<br>
|
1041 |
+
์ฃผ์ ๊ธฐ๋ฅ:
|
1042 |
+
<ul>
|
1043 |
+
<li>๋ฐ๊ธฐ, ๋๋น, ์ฑ๋, ์์จ๋ ๋ฑ ๋ค์ํ ์กฐ์ ์ต์
</li>
|
1044 |
+
<li>๋ชจ๋ ๋ณ๊ฒฝ์ฌํญ ์ค์๊ฐ ๋ฏธ๋ฆฌ๋ณด๊ธฐ</li>
|
1045 |
+
<li>ํธ์ง ์๋ฃ ํ JPG ํ์์ผ๋ก ์ ์ฅ ๊ฐ๋ฅ</li>
|
1046 |
+
</ul>
|
1047 |
+
|
1048 |
+
<div class="tip-box">
|
1049 |
+
<i class="fas fa-lightbulb"></i> <strong>ํ:</strong> ๊ฐ ์ฌ๋ผ์ด๋๋ฅผ ์กฐ๊ธ์ฉ ์กฐ์ ํ๋ฉฐ ์ํ๋ ํจ๊ณผ๋ฅผ ์ฐพ์๋ณด์ธ์.
|
1050 |
+
</div>
|
1051 |
+
</p>
|
1052 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1053 |
|
1054 |
+
<div class="manual-section">
|
1055 |
+
<div class="manual-section-title"><i class="fas fa-question-circle"></i> ์์ฃผ ๋ฌป๋ ์ง๋ฌธ</div>
|
1056 |
+
<p class="manual-text">
|
1057 |
+
<strong style="font-size: 1.1rem; color: #5561e9;">Q: ์ด๋ค ํ์์ ์ด๋ฏธ์ง๋ฅผ ์
๋ก๋ํ ์ ์๋์?</strong><br>
|
1058 |
+
A: JPG, PNG, WEBP ๋ฑ ๋๋ถ๋ถ์ ์ผ๋ฐ์ ์ธ ์ด๋ฏธ์ง ํ์์ ์ง์ํฉ๋๋ค.<br><br>
|
1059 |
+
|
1060 |
+
<strong style="font-size: 1.1rem; color: #5561e9;">Q: ์ด๋ฏธ์ง ์์ฑ ๋ฐ ์ฒ๋ฆฌ์ ์ผ๋ง๋ ์๊ฐ์ด ๊ฑธ๋ฆฌ๋์?</strong><br>
|
1061 |
+
A: ์ผ๋ฐ์ ์ผ๋ก 10-30์ด ์ ๋ ์์๋๋ฉฐ, ์ด๋ฏธ์ง ํฌ๊ธฐ์ ๋ณต์ก๋์ ๋ฐ๋ผ ๋ฌ๋ผ์ง ์ ์์ต๋๋ค.<br><br>
|
1062 |
+
|
1063 |
+
<strong style="font-size: 1.1rem; color: #5561e9;">Q: ์์ฑ๋ ์ด๋ฏธ์ง๋ฅผ ์ด๋ป๊ฒ ์ ์ฅํ ์ ์๋์?</strong><br>
|
1064 |
+
A: ์์ฑ๋ ์ด๋ฏธ์ง์ ๋ง์ฐ์ค ์ค๋ฅธ์ชฝ ๋ฒํผ์ ํด๋ฆญํ์ฌ '์ด๋ฏธ์ง ์ ์ฅ' ์ต์
์ ์ ํํ๋ฉด ๋ฉ๋๋ค.
|
1065 |
+
</p>
|
1066 |
</div>
|
1067 |
+
</div>
|
1068 |
+
""")
|
1069 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1070 |
with gr.TabItem("โจ ์ด์ปค๋จธ์ค ์ด๋ฏธ์ง ์์ฑ๊ธฐ", elem_classes="tab-content"):
|
1071 |
with gr.Row(equal_height=True):
|
1072 |
with gr.Column(scale=1):
|
|
|
1135 |
examples=examples,
|
1136 |
inputs=[image1_input, image2_input, image3_input, prompt_input]
|
1137 |
)
|
1138 |
+
|
1139 |
with gr.TabItem("๐ ์ด๋ฏธ์ง ์
์ค์ผ์ผ๋ฌ", elem_classes="tab-content"):
|
1140 |
with gr.Row():
|
1141 |
with gr.Column(elem_classes="panel"):
|
|
|
1186 |
with gr.Row():
|
1187 |
bg_remove_status = gr.Textbox(label="์ํ", lines=2, elem_classes="custom-input")
|
1188 |
bg_remove_btn = gr.Button('โ๏ธ ๋ฐฐ๊ฒฝ ์ ๊ฑฐํ๊ธฐ', elem_classes="custom-button primary")
|
1189 |
+
|
1190 |
+
# ์ด๋ฏธ์ง ํํฐ ํญ
|
|
|
1191 |
with gr.TabItem("๐๏ธ ์ด๋ฏธ์ง ํํฐ", elem_classes="tab-content"):
|
1192 |
with gr.Row(equal_height=True):
|
1193 |
# ์ผ์ชฝ ์ด: ๋น์จ 3
|
|
|
1195 |
gr.HTML('<div class="section-title"><i class="fas fa-sliders-h"></i> ์ด๋ฏธ์ง ํํฐ ์ค์ </div>')
|
1196 |
# ์ด๋ฏธ์ง ์
๋ก๋
|
1197 |
filter_input_image = gr.Image(type="pil", label="์ด๋ฏธ์ง ์
๋ก๋", elem_classes="image-container")
|
1198 |
+
|
1199 |
# ์กฐ์ ์ฌ๋ผ์ด๋
|
1200 |
with gr.Group():
|
1201 |
brightness_slider = gr.Slider(0.0, 2.0, value=1.0, step=0.1, label="๋ฐ๊ธฐ ์กฐ์ ")
|
|
|
1207 |
vibrance_slider = gr.Slider(-100.0, 100.0, value=0.0, step=1.0, label="ํ๊ธฐ ์กฐ์ ")
|
1208 |
color_mixer_blues_slider = gr.Slider(-100.0, 100.0, value=0.0, step=1.0, label="์ปฌ๋ฌ ๋ฏน์ (๋ธ๋ฃจ)")
|
1209 |
shadows_slider = gr.Slider(-100.0, 100.0, value=0.0, step=1.0, label="๊ทธ๋ฆผ์ ์กฐ์ ")
|
1210 |
+
|
1211 |
# ์ค๋ฅธ์ชฝ ์ด: ๋น์จ 7
|
1212 |
with gr.Column(scale=7, elem_classes="panel"):
|
1213 |
gr.HTML('<div class="section-title"><i class="fas fa-image"></i> ํํฐ ์ ์ฉ ๊ฒฐ๊ณผ</div>')
|
1214 |
# ์ฒ๋ฆฌ๋ ์ด๋ฏธ์ง ์ถ๋ ฅ
|
1215 |
filter_output_image = gr.Image(type="pil", label="์ฒ๋ฆฌ๋ ์ด๋ฏธ์ง", elem_classes="image-container")
|
1216 |
+
|
1217 |
# ๋ณํ๋ ์ด๋ฏธ์ง ๋ค์ด๋ก๋ ๋ฒํผ
|
1218 |
with gr.Row():
|
1219 |
gr.HTML('<div class="section-title"><i class="fas fa-download"></i> ์ด๋ฏธ์ง ์ ์ฅ</div>')
|
1220 |
download_button = gr.Button("JPG๋ก ๋ณํํ๊ธฐ", elem_classes="custom-button primary")
|
1221 |
download_output = gr.File(label="JPG ์ด๋ฏธ์ง ๋ค์ด๋ก๋")
|
1222 |
+
|
1223 |
# ์ด๋ฏธ์ง ์ฒ๋ฆฌ ํจ์ ์ฐ๊ฒฐ
|
1224 |
inputs = [
|
1225 |
filter_input_image,
|
|
|
1233 |
color_mixer_blues_slider,
|
1234 |
shadows_slider
|
1235 |
]
|
1236 |
+
|
1237 |
input_components = [
|
1238 |
brightness_slider,
|
1239 |
contrast_slider,
|
|
|
1245 |
color_mixer_blues_slider,
|
1246 |
shadows_slider
|
1247 |
]
|
1248 |
+
|
1249 |
for input_component in input_components:
|
1250 |
input_component.change(
|
1251 |
fn=process_image,
|
1252 |
inputs=inputs,
|
1253 |
outputs=filter_output_image
|
1254 |
)
|
1255 |
+
|
1256 |
filter_input_image.change(
|
1257 |
fn=lambda x, *args: process_image(x, *args) if x is not None else None,
|
1258 |
inputs=inputs,
|
1259 |
outputs=filter_output_image
|
1260 |
)
|
1261 |
+
|
1262 |
# ๋ค์ด๋ก๋ ๋ฒํผ ๊ธฐ๋ฅ
|
1263 |
download_button.click(
|
1264 |
fn=download_image,
|