Spaces:
Runtime error
Runtime error
Commit Β·
4654883
1
Parent(s): 67798b2
CSS
Browse files246 unmodified lines2472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782791 unmodified line2812822832842852862872882892902912922932942952962972982993003013023 unmodified lines3063073083093103113123133143153163173185 unmodified lines32432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136212 unmodified lines3753763773783793803815 unmodified lines38738838939039139239339439539639739839919 unmodified lines4194204214224234244252 unmodified lines42842943043143243343410 unmodified lines445446447448449246 unmodified lines]css = """/* Define CSS Variables for Consistency */:root {--main-bg-color: #1b1b1b;--main-font: 'Cinzel', serif;--text-color: #f5f5f5;--highlight-color: #ffd700;--accent-color: #8b4513;--shadow-color: rgba(255, 223, 0, 0.8);}/* General body styling */body {background-color: var(--main-bg-color);font-family: var(--main-font);color: var(--text-color);background-image: url('https://www.transparenttextures.com/patterns/dark-matter.png');margin: 0;padding: 0;}/* Container Styling */#col-container {margin: 0 auto;max-width: 550px;padding: 20px;border: 6px solid var(--accent-color);background: radial-gradient(circle, #302d2b 0%, #3b3634 60%, var(--main-bg-color) 100%);border-radius: 20px;box-shadow: 0 0 30px rgba(0, 0, 0, 0.9), 0 0 15px rgba(139, 69, 19, 0.7);transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;1 unmodified line#col-container:hover {transform: scale(1.03);box-shadow: 0 0 40px var(--shadow-color), 0 0 20px rgba(255, 140, 0, 0.8);}/* Fancy Text Effects for Titles */#col-container h1, #col-container h2, #col-container h3 {color: #ffebcc;text-shadow: 0 0 10px var(--accent-color), 0 0 20px var(--highlight-color);}/* Paragraph Text Styling */#col-container p {color: #dcdcdc;text-shadow: 0 0 6px rgba(139, 69, 19, 0.8);}/* Links in Markdown */#col-container a {color: #e6ac00;text-decoration: none;3 unmodified lines#col-container a:hover {color: #fff700;text-shadow: 0 0 10px var(--highlight-color), 0 0 20px #ffebcc;}/* Button Effects */.gr-button {background-color: var(--accent-color);color: var(--text-color);font-weight: bold;padding: 10px 20px;border: 2px solid #b8860b;5 unmodified lines.gr-button:hover {background-color: #b8860b;transform: scale(1.05);box-shadow: 0 0 12px var(--shadow-color), 0 0 24px rgba(255, 140, 0, 0.7);}/* Input and Dropdown Styling */input, select, .gr-input, .gr-slider {background-color: #302d2b;color: var(--text-color);border: 2px solid var(--accent-color);border-radius: 5px;padding: 8px 12px;font-family: var(--main-font);transition: border-color 0.3s ease, box-shadow 0.3s ease;}input:focus, select:focus, .gr-input:focus, .gr-slider:focus {outline: none;border-color: var(--highlight-color);box-shadow: 0 0 8px var(--highlight-color);}/* Advanced Element Styling */.gr-checkbox-label, .gr-accordion {font-weight: bold;color: var(--text-color);text-shadow: 0 0 5px rgba(139, 69, 19, 0.7);}.gr-image {border: 4px solid var(--accent-color);border-radius: 10px;box-shadow: 0 0 10px var(--accent-color), 0 0 20px var(--highlight-color);}.gr-image:hover {box-shadow: 0 0 20px rgba(255, 140, 0, 0.7), 0 0 40px rgba(255, 223, 0, 0.9);}12 unmodified lines""")# Input and Style Selectorwith gr.Row():prompt = gr.Textbox(label="π² Describe Your Vision:",5 unmodified lineschoices=STYLE_NAMES,value=DEFAULT_STYLE_NAME,)# Action Button and Resultwith gr.Row():run_button = gr.Button("Generate Image")result = gr.Image(label="πΌοΈ Your Legendary Vision")# Advanced Settingswith gr.Accordion("βοΈ Advanced Settings", open=False):seed = gr.Slider(label="Seed",19 unmodified linesstep=32,value=1024,)num_inference_steps = gr.Slider(label="Inference Steps",minimum=1,2 unmodified linesvalue=6,)# Examplesgr.Examples(examples=examples,inputs=[prompt, style],10 unmodified linesoutputs=[result, seed],)# Launch Applicationdemo.launch()246 unmodified lines2472482492502512522532542552562572582592602612622632642652662672682691 unmodified line2712722732742752762772782792802812822832842852862872882892902913 unmodified lines2952962972982993003013023033043053063075 unmodified lines31331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137212 unmodified lines3853863873883893903915 unmodified lines39739839940040140240340440540640740840919 unmodified lines4294304314324334344352 unmodified lines43843944044144244344410 unmodified lines455456457458459246 unmodified lines]css = """/* General body styling */body {background-color: #1b1b1b;font-family: 'Cinzel', serif;color: #f5f5f5;background-image: url('https://www.transparenttextures.com/patterns/dark-matter.png');margin: 0;padding: 0;}/* Container */#col-container {margin: 0 auto;max-width: 550px;padding: 20px;border: 6px solid #8b4513;background: radial-gradient(circle, #302d2b 0%, #3b3634 60%, #1b1b1b 100%);border-radius: 20px;box-shadow: 0 0 30px rgba(0, 0, 0, 0.9), 0 0 15px rgba(139, 69, 19, 0.7);transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;1 unmodified line#col-container:hover {transform: scale(1.03);box-shadow: 0 0 40px rgba(255, 223, 0, 0.8), 0 0 20px rgba(255, 140, 0, 0.8);}/* Fancy title and text effects */#col-container h1, #col-container h2, #col-container h3 {color: #ffebcc;text-shadow: 0 0 10px #8b4513, 0 0 20px #ffd700;}#col-container p {color: #dcdcdc;text-shadow: 0 0 6px rgba(139, 69, 19, 0.8);}/* Markdown links */#col-container a {color: #e6ac00;text-decoration: none;3 unmodified lines#col-container a:hover {color: #fff700;text-shadow: 0 0 10px #fff700, 0 0 20px #ffebcc;}/* Buttons with D&D glowing effect */.gr-button {background-color: #8b4513;color: #f5f5f5;font-weight: bold;padding: 10px 20px;border: 2px solid #b8860b;5 unmodified lines.gr-button:hover {background-color: #b8860b;transform: scale(1.05);box-shadow: 0 0 12px rgba(255, 223, 0, 0.9), 0 0 24px rgba(255, 140, 0, 0.7);}/* Input and Dropdown styling */input, select, .gr-input, .gr-slider {background-color: #302d2b;color: #f5f5f5;border: 2px solid #8b4513;border-radius: 5px;padding: 8px 12px;font-family: 'Cinzel', serif;transition: border-color 0.3s ease, box-shadow 0.3s ease;}input:focus, select:focus, .gr-input:focus, .gr-slider:focus {outline: none;border-color: #ffd700;box-shadow: 0 0 8px #ffd700;}/* Slider styling */.gr-slider > div {background-color: #8b4513 !important;}/* Checkbox customization */.gr-checkbox-label {font-weight: bold;color: #f5f5f5;text-shadow: 0 0 5px rgba(139, 69, 19, 0.7);}/* Accordion effects */.gr-accordion {background: linear-gradient(145deg, #302d2b, #3b3634);color: #f5f5f5;border: 2px solid #8b4513;border-radius: 10px;padding: 8px;transition: all 0.3s ease;}.gr-accordion:hover {box-shadow: 0 0 12px rgba(255, 223, 0, 0.7), 0 0 20px rgba(255, 140, 0, 0.5);}/* Image glow effect */.gr-image {border: 4px solid #8b4513;border-radius: 10px;box-shadow: 0 0 10px #8b4513, 0 0 20px #ffd700;}/* Add glow on hover for images */.gr-image:hover {box-shadow: 0 0 20px rgba(255, 140, 0, 0.7), 0 0 40px rgba(255, 223, 0, 0.9);}12 unmodified lines""")# Prompt input and style selectorwith gr.Row():prompt = gr.Textbox(label="π² Describe Your Vision:",5 unmodified lineschoices=STYLE_NAMES,value=DEFAULT_STYLE_NAME,)# Run button and result displaywith gr.Row():run_button = gr.Button("Generate Image")result = gr.Image(label="πΌοΈ Your Legendary Vision")# Advanced settingswith gr.Accordion("βοΈ Advanced Settings", open=False):seed = gr.Slider(label="Seed",19 unmodified linesstep=32,value=1024,)num_inference_steps = gr.Slider(label="Inference Steps",minimum=1,2 unmodified linesvalue=6,)# Examples with stylesgr.Examples(examples=examples,inputs=[prompt, style],10 unmodified linesoutputs=[result, seed],)# Launch the demodemo.launch()
app.py+54-44