Spaces:
Running
on
Zero
Running
on
Zero
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -272,12 +272,12 @@ def change_language(lang_name: str):
|
|
| 272 |
return [
|
| 273 |
# Generate tab
|
| 274 |
gr.update(label=t["prompt"], placeholder=t["prompt_placeholder"]),
|
| 275 |
-
gr.update(label=t["polish_checkbox"]),
|
| 276 |
gr.update(label=t["style"]),
|
| 277 |
gr.update(label=t["aspect_ratio"]),
|
| 278 |
gr.update(label=t["steps"]),
|
| 279 |
gr.update(label=t["seed"]),
|
| 280 |
-
gr.update(label=t["random_seed"]),
|
| 281 |
gr.update(value=t["generate_btn"]),
|
| 282 |
gr.update(label=t["generated_image"]),
|
| 283 |
gr.update(label=t["enhanced_prompt"]),
|
|
@@ -298,12 +298,12 @@ def change_language(lang_name: str):
|
|
| 298 |
gr.update(value=t["transform_description"]),
|
| 299 |
gr.update(label=t["upload_image"]),
|
| 300 |
gr.update(label=t["transformation_prompt"], placeholder=t["transform_placeholder"]),
|
| 301 |
-
gr.update(label=t["polish_checkbox"]),
|
| 302 |
gr.update(label=t["style"]),
|
| 303 |
gr.update(label=t["strength"]),
|
| 304 |
gr.update(label=t["steps"]),
|
| 305 |
gr.update(label=t["seed"]),
|
| 306 |
-
gr.update(label=t["random_seed"]),
|
| 307 |
gr.update(value=t["transform_btn"]),
|
| 308 |
gr.update(label=t["transformed_image"]),
|
| 309 |
gr.update(label=t["enhanced_prompt"]),
|
|
@@ -1250,7 +1250,88 @@ input:focus, textarea:focus {
|
|
| 1250 |
}
|
| 1251 |
|
| 1252 |
.gr-slider input[type="range"] { accent-color: var(--accent-primary); }
|
| 1253 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1254 |
|
| 1255 |
label, .gr-label { color: var(--text-secondary) !important; font-weight: 500; }
|
| 1256 |
|
|
|
|
| 272 |
return [
|
| 273 |
# Generate tab
|
| 274 |
gr.update(label=t["prompt"], placeholder=t["prompt_placeholder"]),
|
| 275 |
+
gr.update(label=t["polish_checkbox"], interactive=True),
|
| 276 |
gr.update(label=t["style"]),
|
| 277 |
gr.update(label=t["aspect_ratio"]),
|
| 278 |
gr.update(label=t["steps"]),
|
| 279 |
gr.update(label=t["seed"]),
|
| 280 |
+
gr.update(label=t["random_seed"], interactive=True),
|
| 281 |
gr.update(value=t["generate_btn"]),
|
| 282 |
gr.update(label=t["generated_image"]),
|
| 283 |
gr.update(label=t["enhanced_prompt"]),
|
|
|
|
| 298 |
gr.update(value=t["transform_description"]),
|
| 299 |
gr.update(label=t["upload_image"]),
|
| 300 |
gr.update(label=t["transformation_prompt"], placeholder=t["transform_placeholder"]),
|
| 301 |
+
gr.update(label=t["polish_checkbox"], interactive=True),
|
| 302 |
gr.update(label=t["style"]),
|
| 303 |
gr.update(label=t["strength"]),
|
| 304 |
gr.update(label=t["steps"]),
|
| 305 |
gr.update(label=t["seed"]),
|
| 306 |
+
gr.update(label=t["random_seed"], interactive=True),
|
| 307 |
gr.update(value=t["transform_btn"]),
|
| 308 |
gr.update(label=t["transformed_image"]),
|
| 309 |
gr.update(label=t["enhanced_prompt"]),
|
|
|
|
| 1250 |
}
|
| 1251 |
|
| 1252 |
.gr-slider input[type="range"] { accent-color: var(--accent-primary); }
|
| 1253 |
+
|
| 1254 |
+
/* Enhanced checkbox styling for clear checked state */
|
| 1255 |
+
.gr-checkbox,
|
| 1256 |
+
.gr-form > div:has(input[type="checkbox"]) {
|
| 1257 |
+
cursor: pointer;
|
| 1258 |
+
padding: 8px 12px !important;
|
| 1259 |
+
margin: 4px 0 !important;
|
| 1260 |
+
border-radius: var(--radius-sm);
|
| 1261 |
+
background: transparent;
|
| 1262 |
+
transition: all var(--transition);
|
| 1263 |
+
display: flex !important;
|
| 1264 |
+
align-items: center !important;
|
| 1265 |
+
gap: 10px !important;
|
| 1266 |
+
}
|
| 1267 |
+
|
| 1268 |
+
.gr-checkbox:hover { background: rgba(129, 140, 248, 0.1) !important; }
|
| 1269 |
+
|
| 1270 |
+
.gr-checkbox input[type="checkbox"],
|
| 1271 |
+
input[type="checkbox"] {
|
| 1272 |
+
width: 20px !important;
|
| 1273 |
+
height: 20px !important;
|
| 1274 |
+
min-width: 20px !important;
|
| 1275 |
+
min-height: 20px !important;
|
| 1276 |
+
accent-color: #a78bfa !important;
|
| 1277 |
+
cursor: pointer !important;
|
| 1278 |
+
pointer-events: auto !important;
|
| 1279 |
+
border: 2px solid var(--border-default) !important;
|
| 1280 |
+
border-radius: 4px !important;
|
| 1281 |
+
background: var(--bg-tertiary) !important;
|
| 1282 |
+
transition: all 0.15s ease !important;
|
| 1283 |
+
}
|
| 1284 |
+
|
| 1285 |
+
.gr-checkbox input[type="checkbox"]:hover,
|
| 1286 |
+
input[type="checkbox"]:hover {
|
| 1287 |
+
border-color: var(--accent-primary) !important;
|
| 1288 |
+
background: var(--surface) !important;
|
| 1289 |
+
}
|
| 1290 |
+
|
| 1291 |
+
.gr-checkbox input[type="checkbox"]:focus,
|
| 1292 |
+
input[type="checkbox"]:focus {
|
| 1293 |
+
outline: none !important;
|
| 1294 |
+
border-color: var(--accent-primary) !important;
|
| 1295 |
+
box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.3) !important;
|
| 1296 |
+
}
|
| 1297 |
+
|
| 1298 |
+
/* CHECKED STATE - Highly visible with glow */
|
| 1299 |
+
.gr-checkbox input[type="checkbox"]:checked,
|
| 1300 |
+
input[type="checkbox"]:checked {
|
| 1301 |
+
background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%) !important;
|
| 1302 |
+
border-color: #a78bfa !important;
|
| 1303 |
+
box-shadow:
|
| 1304 |
+
0 0 12px rgba(167, 139, 250, 0.6),
|
| 1305 |
+
0 0 4px rgba(129, 140, 248, 0.8),
|
| 1306 |
+
inset 0 0 0 1px rgba(255, 255, 255, 0.2) !important;
|
| 1307 |
+
}
|
| 1308 |
+
|
| 1309 |
+
.gr-checkbox input[type="checkbox"]:checked:hover,
|
| 1310 |
+
input[type="checkbox"]:checked:hover {
|
| 1311 |
+
background: linear-gradient(135deg, #a78bfa 0%, #c4b5fd 100%) !important;
|
| 1312 |
+
border-color: #c4b5fd !important;
|
| 1313 |
+
box-shadow:
|
| 1314 |
+
0 0 16px rgba(196, 181, 253, 0.7),
|
| 1315 |
+
0 0 6px rgba(167, 139, 250, 0.9) !important;
|
| 1316 |
+
}
|
| 1317 |
+
|
| 1318 |
+
.gr-checkbox:has(input[type="checkbox"]:checked) {
|
| 1319 |
+
background: rgba(129, 140, 248, 0.15) !important;
|
| 1320 |
+
border: 1px solid rgba(167, 139, 250, 0.3) !important;
|
| 1321 |
+
}
|
| 1322 |
+
|
| 1323 |
+
.gr-checkbox:has(input[type="checkbox"]:checked) label,
|
| 1324 |
+
.gr-checkbox:has(input[type="checkbox"]:checked) span {
|
| 1325 |
+
color: var(--text-primary) !important;
|
| 1326 |
+
}
|
| 1327 |
+
|
| 1328 |
+
.gr-checkbox label,
|
| 1329 |
+
.gr-checkbox span,
|
| 1330 |
+
input[type="checkbox"] + span {
|
| 1331 |
+
color: var(--text-secondary) !important;
|
| 1332 |
+
cursor: pointer !important;
|
| 1333 |
+
user-select: none !important;
|
| 1334 |
+
}
|
| 1335 |
|
| 1336 |
label, .gr-label { color: var(--text-secondary) !important; font-weight: 500; }
|
| 1337 |
|