Spaces:
Runtime error
Runtime error
Commit
·
0aa1e6a
1
Parent(s):
e666523
CSS
Browse files
app.py
CHANGED
@@ -212,7 +212,7 @@ style_list = [
|
|
212 |
|
213 |
styles = {k["name"]: (k["prompt"], k["negative_prompt"]) for k in style_list}
|
214 |
STYLE_NAMES = list(styles.keys())
|
215 |
-
DEFAULT_STYLE_NAME = "Dungeon Map"
|
216 |
|
217 |
# Function to apply selected style
|
218 |
def apply_style(style_name: str, positive: str, negative: str = ""):
|
@@ -266,7 +266,6 @@ body {
|
|
266 |
margin: 0;
|
267 |
padding: 0;
|
268 |
}
|
269 |
-
|
270 |
/* Container */
|
271 |
#col-container {
|
272 |
margin: 0 auto;
|
@@ -278,23 +277,19 @@ body {
|
|
278 |
box-shadow: 0 0 30px rgba(0, 0, 0, 0.9), 0 0 15px rgba(139, 69, 19, 0.7);
|
279 |
transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
|
280 |
}
|
281 |
-
|
282 |
#col-container:hover {
|
283 |
transform: scale(1.03);
|
284 |
box-shadow: 0 0 40px rgba(255, 223, 0, 0.8), 0 0 20px rgba(255, 140, 0, 0.8);
|
285 |
}
|
286 |
-
|
287 |
/* Fancy title and text effects */
|
288 |
#col-container h1, #col-container h2, #col-container h3 {
|
289 |
color: #ffebcc;
|
290 |
text-shadow: 0 0 10px #8b4513, 0 0 20px #ffd700;
|
291 |
}
|
292 |
-
|
293 |
#col-container p {
|
294 |
color: #dcdcdc;
|
295 |
text-shadow: 0 0 6px rgba(139, 69, 19, 0.8);
|
296 |
}
|
297 |
-
|
298 |
/* Markdown links */
|
299 |
#col-container a {
|
300 |
color: #e6ac00;
|
@@ -302,12 +297,10 @@ body {
|
|
302 |
font-weight: bold;
|
303 |
transition: color 0.3s ease-in-out, text-shadow 0.3s ease-in-out;
|
304 |
}
|
305 |
-
|
306 |
#col-container a:hover {
|
307 |
color: #fff700;
|
308 |
text-shadow: 0 0 10px #fff700, 0 0 20px #ffebcc;
|
309 |
}
|
310 |
-
|
311 |
/* Buttons with D&D glowing effect */
|
312 |
.gr-button {
|
313 |
background-color: #8b4513;
|
@@ -319,13 +312,11 @@ body {
|
|
319 |
cursor: pointer;
|
320 |
transition: background-color 0.4s ease-in-out, box-shadow 0.4s ease-in-out, transform 0.2s ease-in-out;
|
321 |
}
|
322 |
-
|
323 |
.gr-button:hover {
|
324 |
background-color: #b8860b;
|
325 |
transform: scale(1.05);
|
326 |
box-shadow: 0 0 12px rgba(255, 223, 0, 0.9), 0 0 24px rgba(255, 140, 0, 0.7);
|
327 |
}
|
328 |
-
|
329 |
/* Input and Dropdown styling */
|
330 |
input, select, .gr-input, .gr-slider {
|
331 |
background-color: #302d2b;
|
@@ -336,25 +327,21 @@ input, select, .gr-input, .gr-slider {
|
|
336 |
font-family: 'Cinzel', serif;
|
337 |
transition: border-color 0.3s ease, box-shadow 0.3s ease;
|
338 |
}
|
339 |
-
|
340 |
input:focus, select:focus, .gr-input:focus, .gr-slider:focus {
|
341 |
outline: none;
|
342 |
border-color: #ffd700;
|
343 |
box-shadow: 0 0 8px #ffd700;
|
344 |
}
|
345 |
-
|
346 |
/* Slider styling */
|
347 |
.gr-slider > div {
|
348 |
background-color: #8b4513 !important;
|
349 |
}
|
350 |
-
|
351 |
/* Checkbox customization */
|
352 |
.gr-checkbox-label {
|
353 |
font-weight: bold;
|
354 |
color: #f5f5f5;
|
355 |
text-shadow: 0 0 5px rgba(139, 69, 19, 0.7);
|
356 |
}
|
357 |
-
|
358 |
/* Accordion effects */
|
359 |
.gr-accordion {
|
360 |
background: linear-gradient(145deg, #302d2b, #3b3634);
|
@@ -364,18 +351,15 @@ input:focus, select:focus, .gr-input:focus, .gr-slider:focus {
|
|
364 |
padding: 8px;
|
365 |
transition: all 0.3s ease;
|
366 |
}
|
367 |
-
|
368 |
.gr-accordion:hover {
|
369 |
box-shadow: 0 0 12px rgba(255, 223, 0, 0.7), 0 0 20px rgba(255, 140, 0, 0.5);
|
370 |
}
|
371 |
-
|
372 |
/* Image glow effect */
|
373 |
.gr-image {
|
374 |
border: 4px solid #8b4513;
|
375 |
border-radius: 10px;
|
376 |
box-shadow: 0 0 10px #8b4513, 0 0 20px #ffd700;
|
377 |
}
|
378 |
-
|
379 |
/* Add glow on hover for images */
|
380 |
.gr-image:hover {
|
381 |
box-shadow: 0 0 20px rgba(255, 140, 0, 0.7), 0 0 40px rgba(255, 223, 0, 0.9);
|
@@ -388,7 +372,7 @@ with gr.Blocks(css=css) as demo:
|
|
388 |
# Title and Description
|
389 |
gr.Markdown(
|
390 |
"""
|
391 |
-
# 🛡️ ChatDnD.net Dungeon Generator ⚔️
|
392 |
**Unleash Your Imagination!** Create heroes, maps, quests, and epic scenes to bring your campaigns to life.
|
393 |
Tailored for adventurers seeking inspiration or Dungeon Masters constructing their next grand story. <br>
|
394 |
[Visit Our Website](https://chatdnd.net) | [Support Us](https://buymeacoffee.com/watchoutformike)
|
@@ -445,7 +429,7 @@ with gr.Blocks(css=css) as demo:
|
|
445 |
minimum=1,
|
446 |
maximum=50,
|
447 |
step=1,
|
448 |
-
value=
|
449 |
)
|
450 |
|
451 |
# Examples with styles
|
|
|
212 |
|
213 |
styles = {k["name"]: (k["prompt"], k["negative_prompt"]) for k in style_list}
|
214 |
STYLE_NAMES = list(styles.keys())
|
215 |
+
DEFAULT_STYLE_NAME = "Black & White Dungeon Map"
|
216 |
|
217 |
# Function to apply selected style
|
218 |
def apply_style(style_name: str, positive: str, negative: str = ""):
|
|
|
266 |
margin: 0;
|
267 |
padding: 0;
|
268 |
}
|
|
|
269 |
/* Container */
|
270 |
#col-container {
|
271 |
margin: 0 auto;
|
|
|
277 |
box-shadow: 0 0 30px rgba(0, 0, 0, 0.9), 0 0 15px rgba(139, 69, 19, 0.7);
|
278 |
transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
|
279 |
}
|
|
|
280 |
#col-container:hover {
|
281 |
transform: scale(1.03);
|
282 |
box-shadow: 0 0 40px rgba(255, 223, 0, 0.8), 0 0 20px rgba(255, 140, 0, 0.8);
|
283 |
}
|
|
|
284 |
/* Fancy title and text effects */
|
285 |
#col-container h1, #col-container h2, #col-container h3 {
|
286 |
color: #ffebcc;
|
287 |
text-shadow: 0 0 10px #8b4513, 0 0 20px #ffd700;
|
288 |
}
|
|
|
289 |
#col-container p {
|
290 |
color: #dcdcdc;
|
291 |
text-shadow: 0 0 6px rgba(139, 69, 19, 0.8);
|
292 |
}
|
|
|
293 |
/* Markdown links */
|
294 |
#col-container a {
|
295 |
color: #e6ac00;
|
|
|
297 |
font-weight: bold;
|
298 |
transition: color 0.3s ease-in-out, text-shadow 0.3s ease-in-out;
|
299 |
}
|
|
|
300 |
#col-container a:hover {
|
301 |
color: #fff700;
|
302 |
text-shadow: 0 0 10px #fff700, 0 0 20px #ffebcc;
|
303 |
}
|
|
|
304 |
/* Buttons with D&D glowing effect */
|
305 |
.gr-button {
|
306 |
background-color: #8b4513;
|
|
|
312 |
cursor: pointer;
|
313 |
transition: background-color 0.4s ease-in-out, box-shadow 0.4s ease-in-out, transform 0.2s ease-in-out;
|
314 |
}
|
|
|
315 |
.gr-button:hover {
|
316 |
background-color: #b8860b;
|
317 |
transform: scale(1.05);
|
318 |
box-shadow: 0 0 12px rgba(255, 223, 0, 0.9), 0 0 24px rgba(255, 140, 0, 0.7);
|
319 |
}
|
|
|
320 |
/* Input and Dropdown styling */
|
321 |
input, select, .gr-input, .gr-slider {
|
322 |
background-color: #302d2b;
|
|
|
327 |
font-family: 'Cinzel', serif;
|
328 |
transition: border-color 0.3s ease, box-shadow 0.3s ease;
|
329 |
}
|
|
|
330 |
input:focus, select:focus, .gr-input:focus, .gr-slider:focus {
|
331 |
outline: none;
|
332 |
border-color: #ffd700;
|
333 |
box-shadow: 0 0 8px #ffd700;
|
334 |
}
|
|
|
335 |
/* Slider styling */
|
336 |
.gr-slider > div {
|
337 |
background-color: #8b4513 !important;
|
338 |
}
|
|
|
339 |
/* Checkbox customization */
|
340 |
.gr-checkbox-label {
|
341 |
font-weight: bold;
|
342 |
color: #f5f5f5;
|
343 |
text-shadow: 0 0 5px rgba(139, 69, 19, 0.7);
|
344 |
}
|
|
|
345 |
/* Accordion effects */
|
346 |
.gr-accordion {
|
347 |
background: linear-gradient(145deg, #302d2b, #3b3634);
|
|
|
351 |
padding: 8px;
|
352 |
transition: all 0.3s ease;
|
353 |
}
|
|
|
354 |
.gr-accordion:hover {
|
355 |
box-shadow: 0 0 12px rgba(255, 223, 0, 0.7), 0 0 20px rgba(255, 140, 0, 0.5);
|
356 |
}
|
|
|
357 |
/* Image glow effect */
|
358 |
.gr-image {
|
359 |
border: 4px solid #8b4513;
|
360 |
border-radius: 10px;
|
361 |
box-shadow: 0 0 10px #8b4513, 0 0 20px #ffd700;
|
362 |
}
|
|
|
363 |
/* Add glow on hover for images */
|
364 |
.gr-image:hover {
|
365 |
box-shadow: 0 0 20px rgba(255, 140, 0, 0.7), 0 0 40px rgba(255, 223, 0, 0.9);
|
|
|
372 |
# Title and Description
|
373 |
gr.Markdown(
|
374 |
"""
|
375 |
+
# 🛡️ ChatDnD.net D&D Dungeon Map Generator ⚔️
|
376 |
**Unleash Your Imagination!** Create heroes, maps, quests, and epic scenes to bring your campaigns to life.
|
377 |
Tailored for adventurers seeking inspiration or Dungeon Masters constructing their next grand story. <br>
|
378 |
[Visit Our Website](https://chatdnd.net) | [Support Us](https://buymeacoffee.com/watchoutformike)
|
|
|
429 |
minimum=1,
|
430 |
maximum=50,
|
431 |
step=1,
|
432 |
+
value=4,
|
433 |
)
|
434 |
|
435 |
# Examples with styles
|