Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,3 @@
|
|
1 |
-
from diffusers_helper.hf_login import login
|
2 |
-
|
3 |
import os
|
4 |
import threading
|
5 |
import time
|
@@ -468,6 +466,9 @@ def worker(
|
|
468 |
global last_update_time
|
469 |
last_update_time = time.time()
|
470 |
|
|
|
|
|
|
|
471 |
total_second_length = min(total_second_length, 5.0)
|
472 |
|
473 |
try:
|
@@ -1067,13 +1068,13 @@ quick_prompts = [
|
|
1067 |
["A character doing some simple body movements."]
|
1068 |
]
|
1069 |
|
1070 |
-
# CSS
|
1071 |
def make_custom_css():
|
1072 |
base_progress_css = make_progress_bar_css()
|
1073 |
-
|
1074 |
-
/*
|
1075 |
body {
|
1076 |
-
background: #
|
1077 |
font-family: "Noto Sans", sans-serif;
|
1078 |
}
|
1079 |
#app-container {
|
@@ -1083,35 +1084,39 @@ def make_custom_css():
|
|
1083 |
position: relative;
|
1084 |
}
|
1085 |
#app-container h1 {
|
1086 |
-
color: #
|
1087 |
margin-bottom: 1.2rem;
|
1088 |
font-weight: 700;
|
|
|
1089 |
}
|
1090 |
.gr-panel {
|
1091 |
-
background: #
|
1092 |
-
border: 1px solid #
|
1093 |
border-radius: 8px;
|
1094 |
padding: 1rem;
|
1095 |
-
box-shadow: 0 1px
|
1096 |
}
|
1097 |
.button-container button {
|
1098 |
min-height: 45px;
|
1099 |
font-size: 1rem;
|
1100 |
font-weight: 600;
|
|
|
1101 |
}
|
1102 |
.button-container button#start-button {
|
1103 |
-
background-color: #
|
1104 |
color: #fff !important;
|
|
|
1105 |
}
|
1106 |
.button-container button#stop-button {
|
1107 |
-
background-color: #
|
1108 |
color: #fff !important;
|
|
|
1109 |
}
|
1110 |
.button-container button:hover {
|
1111 |
filter: brightness(0.95);
|
1112 |
}
|
1113 |
.preview-container, .video-container {
|
1114 |
-
border: 1px solid #
|
1115 |
border-radius: 8px;
|
1116 |
overflow: hidden;
|
1117 |
}
|
@@ -1120,15 +1125,16 @@ def make_custom_css():
|
|
1120 |
margin-bottom: 15px;
|
1121 |
}
|
1122 |
.error-message {
|
1123 |
-
background-color: #
|
1124 |
-
border: 1px solid #
|
1125 |
-
color: #
|
1126 |
padding: 10px;
|
1127 |
border-radius: 4px;
|
1128 |
margin-top: 10px;
|
|
|
1129 |
}
|
1130 |
.error-icon {
|
1131 |
-
color: #
|
1132 |
margin-right: 8px;
|
1133 |
}
|
1134 |
#error-message {
|
@@ -1150,7 +1156,7 @@ def make_custom_css():
|
|
1150 |
}
|
1151 |
}
|
1152 |
"""
|
1153 |
-
return base_progress_css +
|
1154 |
|
1155 |
css = make_custom_css()
|
1156 |
|
@@ -1233,11 +1239,12 @@ with block:
|
|
1233 |
value=31337,
|
1234 |
precision=0
|
1235 |
)
|
|
|
1236 |
total_second_length = gr.Slider(
|
1237 |
label=get_translation("video_length"),
|
1238 |
minimum=1,
|
1239 |
maximum=5,
|
1240 |
-
value=
|
1241 |
step=0.1
|
1242 |
)
|
1243 |
latent_window_size = gr.Slider(
|
|
|
|
|
|
|
1 |
import os
|
2 |
import threading
|
3 |
import time
|
|
|
466 |
global last_update_time
|
467 |
last_update_time = time.time()
|
468 |
|
469 |
+
# ์์ฒญ ์ฌํญ: ๊ธฐ๋ณธ 2์ด๋ก ์ค์ , 5์ด๊น์ง ๊ฐ๋ฅ.
|
470 |
+
# ์๋๋ ์ฌ๋ผ์ด๋์์ ์ด๋ฏธ min=1, max=5๋ก ์ค์ ๋์ด ์์ผ๋ฉฐ, ๊ธฐ๋ณธ๊ฐ์ 2๋ก ์์ ํ์์.
|
471 |
+
# ๋ด๋ถ ๋ก์ง์์๋ ์ต๋ 5์ด ์ด์์ ๋ชป ๊ฐ๋๋ก ์ฒ๋ฆฌ
|
472 |
total_second_length = min(total_second_length, 5.0)
|
473 |
|
474 |
try:
|
|
|
1068 |
["A character doing some simple body movements."]
|
1069 |
]
|
1070 |
|
1071 |
+
# CSS (ํ์คํ
ํค ์คํ์ผ)
|
1072 |
def make_custom_css():
|
1073 |
base_progress_css = make_progress_bar_css()
|
1074 |
+
pastel_css = """
|
1075 |
+
/* ํ์คํ
ํค, ์ข ๋ ๋ถ๋๋ฝ๊ณ ์ธ๋ จ๋ UI ์คํ์ผ */
|
1076 |
body {
|
1077 |
+
background: #faf9ff !important;
|
1078 |
font-family: "Noto Sans", sans-serif;
|
1079 |
}
|
1080 |
#app-container {
|
|
|
1084 |
position: relative;
|
1085 |
}
|
1086 |
#app-container h1 {
|
1087 |
+
color: #5F5AA2;
|
1088 |
margin-bottom: 1.2rem;
|
1089 |
font-weight: 700;
|
1090 |
+
text-shadow: 1px 1px 2px #bbb;
|
1091 |
}
|
1092 |
.gr-panel {
|
1093 |
+
background: #ffffffcc;
|
1094 |
+
border: 1px solid #e1dff0;
|
1095 |
border-radius: 8px;
|
1096 |
padding: 1rem;
|
1097 |
+
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
1098 |
}
|
1099 |
.button-container button {
|
1100 |
min-height: 45px;
|
1101 |
font-size: 1rem;
|
1102 |
font-weight: 600;
|
1103 |
+
border-radius: 6px;
|
1104 |
}
|
1105 |
.button-container button#start-button {
|
1106 |
+
background-color: #A289E3 !important;
|
1107 |
color: #fff !important;
|
1108 |
+
border: 1px solid #a58de2;
|
1109 |
}
|
1110 |
.button-container button#stop-button {
|
1111 |
+
background-color: #F48A9B !important;
|
1112 |
color: #fff !important;
|
1113 |
+
border: 1px solid #f18fa0;
|
1114 |
}
|
1115 |
.button-container button:hover {
|
1116 |
filter: brightness(0.95);
|
1117 |
}
|
1118 |
.preview-container, .video-container {
|
1119 |
+
border: 1px solid #ded9f2;
|
1120 |
border-radius: 8px;
|
1121 |
overflow: hidden;
|
1122 |
}
|
|
|
1125 |
margin-bottom: 15px;
|
1126 |
}
|
1127 |
.error-message {
|
1128 |
+
background-color: #FFF5F5;
|
1129 |
+
border: 1px solid #FED7D7;
|
1130 |
+
color: #E53E3E;
|
1131 |
padding: 10px;
|
1132 |
border-radius: 4px;
|
1133 |
margin-top: 10px;
|
1134 |
+
font-weight: 500;
|
1135 |
}
|
1136 |
.error-icon {
|
1137 |
+
color: #E53E3E;
|
1138 |
margin-right: 8px;
|
1139 |
}
|
1140 |
#error-message {
|
|
|
1156 |
}
|
1157 |
}
|
1158 |
"""
|
1159 |
+
return base_progress_css + pastel_css
|
1160 |
|
1161 |
css = make_custom_css()
|
1162 |
|
|
|
1239 |
value=31337,
|
1240 |
precision=0
|
1241 |
)
|
1242 |
+
# ์ฌ๊ธฐ์ ๊ธฐ๋ณธ๊ฐ(value)์ 2๋ก ๋ณ๊ฒฝ (์ต๋ 5๋ ๊ทธ๋๋ก ์ ์ง)
|
1243 |
total_second_length = gr.Slider(
|
1244 |
label=get_translation("video_length"),
|
1245 |
minimum=1,
|
1246 |
maximum=5,
|
1247 |
+
value=2,
|
1248 |
step=0.1
|
1249 |
)
|
1250 |
latent_window_size = gr.Slider(
|