Spaces:
Runtime error
Runtime error
guardiancc
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -2087,37 +2087,20 @@ def remove_custom_lora():
|
|
2087 |
|
2088 |
run_lora.zerogpu = True
|
2089 |
|
2090 |
-
|
2091 |
-
#gen_btn{height: 100%}
|
2092 |
-
#gen_column{align-self: stretch}
|
2093 |
-
#title{text-align: center}
|
2094 |
-
#title h1{font-size: 3em; display:inline-flex; align-items:center}
|
2095 |
-
#title img{width: 100px; margin-right: 0.5em}
|
2096 |
-
#gallery .grid-wrap{height: 10vh}
|
2097 |
-
#lora_list{background: var(--block-background-fill);padding: 0 1em .3em; font-size: 90%}
|
2098 |
-
.card_internal{display: flex;height: 100px;margin-top: .5em}
|
2099 |
-
.card_internal img{margin-right: 1em}
|
2100 |
-
.styler{--form-gap-width: 0px !important}
|
2101 |
-
#progress{height:30px}
|
2102 |
-
#progress .generating{display:none}
|
2103 |
-
.progress-container {width: 100%;height: 30px;background-color: #f0f0f0;border-radius: 15px;overflow: hidden;margin-bottom: 20px}
|
2104 |
-
.progress-bar {height: 100%;background-color: #4f46e5;width: calc(var(--current) / var(--total) * 100%);transition: width 0.5s ease-in-out}
|
2105 |
-
'''
|
2106 |
-
|
2107 |
-
with gr.Blocks(theme="prithivMLmods/Minecraft-Theme", css=css, delete_cache=(60, 60)) as app:
|
2108 |
title = gr.HTML(
|
2109 |
-
"""<h1>
|
2110 |
elem_id="title",
|
2111 |
)
|
2112 |
selected_index = gr.State(None)
|
2113 |
with gr.Row():
|
2114 |
with gr.Column(scale=3):
|
2115 |
prompt = gr.Textbox(label="Prompt", lines=1, placeholder=":/ choose the LoRA and type the prompt ")
|
2116 |
-
with gr.Column(scale=1, elem_id="gen_column"):
|
2117 |
-
generate_button = gr.Button("Generate", variant="primary", elem_id="gen_btn")
|
2118 |
with gr.Row():
|
2119 |
with gr.Column():
|
2120 |
selected_info = gr.Markdown("")
|
|
|
|
|
2121 |
gallery = gr.Gallery(
|
2122 |
[(item["image"], item["title"]) for item in loras],
|
2123 |
label="LoRA DLC's",
|
@@ -2126,11 +2109,8 @@ with gr.Blocks(theme="prithivMLmods/Minecraft-Theme", css=css, delete_cache=(60,
|
|
2126 |
elem_id="gallery",
|
2127 |
show_share_button=False
|
2128 |
)
|
2129 |
-
|
2130 |
-
|
2131 |
-
gr.Markdown("[Check the list of FLUX LoRA's](https://huggingface.co/models?other=base_model:adapter:black-forest-labs/FLUX.1-dev)", elem_id="lora_list")
|
2132 |
-
custom_lora_info = gr.HTML(visible=False)
|
2133 |
-
custom_lora_button = gr.Button("Remove custom LoRA", visible=False)
|
2134 |
with gr.Column():
|
2135 |
progress_bar = gr.Markdown(elem_id="progress",visible=False)
|
2136 |
result = gr.Image(label="Generated Image")
|
@@ -2138,7 +2118,6 @@ with gr.Blocks(theme="prithivMLmods/Minecraft-Theme", css=css, delete_cache=(60,
|
|
2138 |
with gr.Row():
|
2139 |
with gr.Accordion("Advanced Settings", open=False):
|
2140 |
with gr.Row():
|
2141 |
-
input_image = gr.Image(label="Input image", type="filepath")
|
2142 |
image_strength = gr.Slider(label="Denoise Strength", info="Lower means more image influence", minimum=0.1, maximum=1.0, step=0.01, value=0.75)
|
2143 |
with gr.Column():
|
2144 |
with gr.Row():
|
@@ -2159,15 +2138,6 @@ with gr.Blocks(theme="prithivMLmods/Minecraft-Theme", css=css, delete_cache=(60,
|
|
2159 |
inputs=[width, height],
|
2160 |
outputs=[prompt, selected_info, selected_index, width, height]
|
2161 |
)
|
2162 |
-
custom_lora.input(
|
2163 |
-
add_custom_lora,
|
2164 |
-
inputs=[custom_lora],
|
2165 |
-
outputs=[custom_lora_info, custom_lora_button, gallery, selected_info, selected_index, prompt]
|
2166 |
-
)
|
2167 |
-
custom_lora_button.click(
|
2168 |
-
remove_custom_lora,
|
2169 |
-
outputs=[custom_lora_info, custom_lora_button, gallery, selected_info, selected_index, custom_lora]
|
2170 |
-
)
|
2171 |
gr.on(
|
2172 |
triggers=[generate_button.click, prompt.submit],
|
2173 |
fn=run_lora,
|
|
|
2087 |
|
2088 |
run_lora.zerogpu = True
|
2089 |
|
2090 |
+
with gr.Blocks(theme="prithivMLmods/Minecraft-Theme", delete_cache=(60, 60)) as app:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2091 |
title = gr.HTML(
|
2092 |
+
"""<h1>Arcane🥳</h1>""",
|
2093 |
elem_id="title",
|
2094 |
)
|
2095 |
selected_index = gr.State(None)
|
2096 |
with gr.Row():
|
2097 |
with gr.Column(scale=3):
|
2098 |
prompt = gr.Textbox(label="Prompt", lines=1, placeholder=":/ choose the LoRA and type the prompt ")
|
|
|
|
|
2099 |
with gr.Row():
|
2100 |
with gr.Column():
|
2101 |
selected_info = gr.Markdown("")
|
2102 |
+
input_image = gr.Image(label="Input image", type="filepath")
|
2103 |
+
|
2104 |
gallery = gr.Gallery(
|
2105 |
[(item["image"], item["title"]) for item in loras],
|
2106 |
label="LoRA DLC's",
|
|
|
2109 |
elem_id="gallery",
|
2110 |
show_share_button=False
|
2111 |
)
|
2112 |
+
generate_button = gr.Button("Generate", variant="primary", elem_id="gen_btn")
|
2113 |
+
|
|
|
|
|
|
|
2114 |
with gr.Column():
|
2115 |
progress_bar = gr.Markdown(elem_id="progress",visible=False)
|
2116 |
result = gr.Image(label="Generated Image")
|
|
|
2118 |
with gr.Row():
|
2119 |
with gr.Accordion("Advanced Settings", open=False):
|
2120 |
with gr.Row():
|
|
|
2121 |
image_strength = gr.Slider(label="Denoise Strength", info="Lower means more image influence", minimum=0.1, maximum=1.0, step=0.01, value=0.75)
|
2122 |
with gr.Column():
|
2123 |
with gr.Row():
|
|
|
2138 |
inputs=[width, height],
|
2139 |
outputs=[prompt, selected_info, selected_index, width, height]
|
2140 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2141 |
gr.on(
|
2142 |
triggers=[generate_button.click, prompt.submit],
|
2143 |
fn=run_lora,
|