Spaces:
Paused
Paused
Commit
•
ab17f6e
1
Parent(s):
d67100d
Update app.py
Browse files
app.py
CHANGED
@@ -84,6 +84,7 @@ def run_lora(prompt, negative, weight, selected_state):
|
|
84 |
return image
|
85 |
|
86 |
css = '''
|
|
|
87 |
#prompt textarea{width: calc(100% - 160px);border-top-right-radius: 0px;border-bottom-right-radius: 0px;}
|
88 |
#run_button{position:absolute;margin-top: 38px;right: 0;margin-right: 0.8em;border-bottom-left-radius: 0px;
|
89 |
border-top-left-radius: 0px;}
|
@@ -92,7 +93,7 @@ css = '''
|
|
92 |
'''
|
93 |
|
94 |
with gr.Blocks(css=css) as demo:
|
95 |
-
title = gr.Markdown("# Lora The Explorer XL")
|
96 |
with gr.Row():
|
97 |
gallery = gr.Gallery(value=[(a, b) for a, b, _, _, _, _ in sdxl_loras],
|
98 |
label="LoRA Gallery",
|
@@ -122,6 +123,8 @@ with gr.Blocks(css=css) as demo:
|
|
122 |
gr.Markdown("")
|
123 |
selected_state = gr.State()
|
124 |
gallery.select(update_selection, outputs=[prompt_title, prompt, selected_state], queue=False, show_progress=False)
|
|
|
125 |
button.click(fn=run_lora, inputs=[prompt, negative, weight, selected_state], outputs=result)
|
126 |
|
|
|
127 |
demo.launch()
|
|
|
84 |
return image
|
85 |
|
86 |
css = '''
|
87 |
+
#title{font-size: 250%; text-align: center}
|
88 |
#prompt textarea{width: calc(100% - 160px);border-top-right-radius: 0px;border-bottom-right-radius: 0px;}
|
89 |
#run_button{position:absolute;margin-top: 38px;right: 0;margin-right: 0.8em;border-bottom-left-radius: 0px;
|
90 |
border-top-left-radius: 0px;}
|
|
|
93 |
'''
|
94 |
|
95 |
with gr.Blocks(css=css) as demo:
|
96 |
+
title = gr.Markdown("# Lora The Explorer XL", elem_id="title")
|
97 |
with gr.Row():
|
98 |
gallery = gr.Gallery(value=[(a, b) for a, b, _, _, _, _ in sdxl_loras],
|
99 |
label="LoRA Gallery",
|
|
|
123 |
gr.Markdown("")
|
124 |
selected_state = gr.State()
|
125 |
gallery.select(update_selection, outputs=[prompt_title, prompt, selected_state], queue=False, show_progress=False)
|
126 |
+
promot.submit(fn=run_lora, inputs=[prompt, negative, weight, selected_state], outputs=result)
|
127 |
button.click(fn=run_lora, inputs=[prompt, negative, weight, selected_state], outputs=result)
|
128 |
|
129 |
+
|
130 |
demo.launch()
|