Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files63 unmodified lines64656667686970717273129 unmodified lines20320420520620720820921021121221321421521621721821963 unmodified linesnegative = ""return p.replace("{prompt}", positive), n + negativeDESCRIPTION = """## SDXL Image Generation"""if not torch.cuda.is_available():DESCRIPTION += "\n<p>⚠️Running on CPU, This may not work on CPU.</p>"129 unmodified lines}'''with gr.Blocks(theme="YTheme/Gradient", css=css) as demo:gr.Markdown(DESCRIPTION)with gr.Group():with gr.Row():prompt = gr.Text(show_label=False,max_lines=1,placeholder="Enter your prompt",container=False,)run_button = gr.Button("Run", scale=0, variant="primary")result = gr.Gallery(label="Result", columns=1, preview=True) # columns=1 for single image below each other if multiplewith gr.Accordion("Advanced options", open=False):style_selection = gr.Dropdown( # MODIFIED: Was gr.Radio, moved into accordion63 unmodified lines646566676869129 unmodified lines19920020120220320420520620720820921021121221363 unmodified linesnegative = ""return p.replace("{prompt}", positive), n + negativeif not torch.cuda.is_available():DESCRIPTION += "\n<p>⚠️Running on CPU, This may not work on CPU.</p>"129 unmodified lines}'''with gr.Blocks(theme="YTheme/Gradient", css=css) as demo:with gr.Row():prompt = gr.Text(show_label=False,max_lines=1,placeholder="Enter your prompt",container=False,)run_button = gr.Button("Run", scale=0, variant="primary")result = gr.Gallery(label="Result", columns=1, preview=True) # columns=1 for single image below each other if multiplewith gr.Accordion("Advanced options", open=False):style_selection = gr.Dropdown( # MODIFIED: Was gr.Radio, moved into accordion
app.py+9-15