Update app.py
Browse files
app.py
CHANGED
|
@@ -27,18 +27,18 @@ MAX_IMAGE_SIZE = 1024
|
|
| 27 |
|
| 28 |
def infer(prompt, negative_prompt, seed, randomize_seed, image_style,cfg,lora_scale):
|
| 29 |
pipe.unload_lora_weights()
|
| 30 |
-
if image_style == "No
|
| 31 |
pipe.unload_lora_weights()
|
| 32 |
|
| 33 |
-
elif image_style == "
|
| 34 |
pipe.load_lora_weights("ohkarim/LoRA_logos", weight_name="OH_logos.safetensors", adapter_name="OH_logos")
|
| 35 |
prompt=prompt+", detailed, close up, unique background color, OH_logos"
|
| 36 |
|
| 37 |
-
elif image_style == "
|
| 38 |
pipe.load_lora_weights("ohkarim/lora_logo_blacknwhite", weight_name="bel_blacknwhite_lora.safetensors", adapter_name="bel_blacknwhite")
|
| 39 |
prompt=prompt+", black and white, balck and white, minimalist, unique background color, bel_blacknwhite"
|
| 40 |
|
| 41 |
-
elif image_style == "
|
| 42 |
pipe.load_lora_weights("ohkarim/lora_logo_modern", weight_name="lora_modern.safetensors", adapter_name="oh_bel_modern")
|
| 43 |
prompt=prompt+", simple, modern, unique background color, oh_bel_modern"
|
| 44 |
|
|
@@ -108,7 +108,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 108 |
with gr.Column():
|
| 109 |
text_prompt = gr.Textbox(label="Input Prompt", placeholder="Example: logo of a coffee shop, cup of coffee, mug, brown shades ", lines=2)
|
| 110 |
negative_prompt = gr.Textbox(label="Negative Prompt (optional)", placeholder="Example: blurry, unfocused, complicated", lines=2)
|
| 111 |
-
image_style = gr.Dropdown(label="Choose a style", choices=["No
|
| 112 |
|
| 113 |
with gr.Column():
|
| 114 |
cfg = gr.Slider(label="Prompt guidance", minimum=1, maximum=20, step=1, value=4)
|
|
|
|
| 27 |
|
| 28 |
def infer(prompt, negative_prompt, seed, randomize_seed, image_style,cfg,lora_scale):
|
| 29 |
pipe.unload_lora_weights()
|
| 30 |
+
if image_style == "No style":
|
| 31 |
pipe.unload_lora_weights()
|
| 32 |
|
| 33 |
+
elif image_style == "style_detailed":
|
| 34 |
pipe.load_lora_weights("ohkarim/LoRA_logos", weight_name="OH_logos.safetensors", adapter_name="OH_logos")
|
| 35 |
prompt=prompt+", detailed, close up, unique background color, OH_logos"
|
| 36 |
|
| 37 |
+
elif image_style == "style_blacknwhite":
|
| 38 |
pipe.load_lora_weights("ohkarim/lora_logo_blacknwhite", weight_name="bel_blacknwhite_lora.safetensors", adapter_name="bel_blacknwhite")
|
| 39 |
prompt=prompt+", black and white, balck and white, minimalist, unique background color, bel_blacknwhite"
|
| 40 |
|
| 41 |
+
elif image_style == "style_cartoon":
|
| 42 |
pipe.load_lora_weights("ohkarim/lora_logo_modern", weight_name="lora_modern.safetensors", adapter_name="oh_bel_modern")
|
| 43 |
prompt=prompt+", simple, modern, unique background color, oh_bel_modern"
|
| 44 |
|
|
|
|
| 108 |
with gr.Column():
|
| 109 |
text_prompt = gr.Textbox(label="Input Prompt", placeholder="Example: logo of a coffee shop, cup of coffee, mug, brown shades ", lines=2)
|
| 110 |
negative_prompt = gr.Textbox(label="Negative Prompt (optional)", placeholder="Example: blurry, unfocused, complicated", lines=2)
|
| 111 |
+
image_style = gr.Dropdown(label="Choose a style", choices=["No style", "style_detailed", "style_blacknwhite", "style_cartoon"], value="No LoRA")
|
| 112 |
|
| 113 |
with gr.Column():
|
| 114 |
cfg = gr.Slider(label="Prompt guidance", minimum=1, maximum=20, step=1, value=4)
|