Spaces:
Runtime error
Runtime error
Linoy Tsaban
commited on
Commit
·
c624994
1
Parent(s):
4328d20
Update app.py
Browse files
app.py
CHANGED
@@ -172,7 +172,7 @@ def select_lora(selected_state: gr.SelectData, sdxl_loras, chosen_prompt):
|
|
172 |
if(chosen_prompt):
|
173 |
spooky_concept = chosen_prompt
|
174 |
else:
|
175 |
-
spooky_concept = random.choice([' spooky witch', ' spooky vampire', ' spooky werewolf', ' spooky ghost', ' spooky wizard', ' spooky pumpkin', ' spooky wizard', 'spooky skeleton'])
|
176 |
lora_repo = sdxl_loras[random_lora_index]["repo"]
|
177 |
lora_title = sdxl_loras[random_lora_index]["title"]
|
178 |
lora_desc = f"""#### LoRA used to edit this image:
|
@@ -227,7 +227,7 @@ def edit(sdxl_loras,
|
|
227 |
|
228 |
latnets = wts[skip].expand(1, -1, -1, -1)
|
229 |
|
230 |
-
# spooky_concept = random.choice([' spooky witch', ' spooky vampire', ' spooky werewolf', ' spooky ghost', ' spooky wizard', ' spooky pumpkin'])
|
231 |
print("spooky concept is: ", spooky_concept)
|
232 |
editing_prompt = [sdxl_loras[random_lora_index]["trigger_word"]+ spooky_concept]
|
233 |
reverse_editing_direction = [False]
|
@@ -310,7 +310,7 @@ with gr.Blocks(css="style.css") as demo:
|
|
310 |
with gr.Box(elem_id="total_box"):
|
311 |
gr.HTML(
|
312 |
"""
|
313 |
-
<h3>Smile, take a pic 📷✨ and <code>it'll be inverted
|
314 |
""",
|
315 |
)
|
316 |
wts = gr.State()
|
|
|
172 |
if(chosen_prompt):
|
173 |
spooky_concept = chosen_prompt
|
174 |
else:
|
175 |
+
spooky_concept = random.choice([' spooky witch', ' spooky vampire', ' spooky werewolf', ' spooky ghost', ' spooky wizard', ' spooky pumpkin', ' spooky wizard', ' spooky skeleton', ' spooky zombie'])
|
176 |
lora_repo = sdxl_loras[random_lora_index]["repo"]
|
177 |
lora_title = sdxl_loras[random_lora_index]["title"]
|
178 |
lora_desc = f"""#### LoRA used to edit this image:
|
|
|
227 |
|
228 |
latnets = wts[skip].expand(1, -1, -1, -1)
|
229 |
|
230 |
+
# spooky_concept = random.choice([' spooky witch', ' spooky vampire', ' spooky werewolf', ' spooky ghost', ' spooky wizard', ' spooky pumpkin', ' spooky skeleton', ' spooky zombie'])
|
231 |
print("spooky concept is: ", spooky_concept)
|
232 |
editing_prompt = [sdxl_loras[random_lora_index]["trigger_word"]+ spooky_concept]
|
233 |
reverse_editing_direction = [False]
|
|
|
310 |
with gr.Box(elem_id="total_box"):
|
311 |
gr.HTML(
|
312 |
"""
|
313 |
+
<h3>Smile, take a pic 📷✨ and <code>it'll be inverted and edited using XLEDITS and a random SDXL LoRA</code></h3>
|
314 |
""",
|
315 |
)
|
316 |
wts = gr.State()
|