Spaces:
Runtime error
Runtime error
Update app.py
Browse files98 unmodified lines9910010110210310410510610710810998 unmodified linesreturn textdef place_lora(current_prompt, lorabtn):if f"<lora:{lorabtn}:1.0>" in current_prompt:result = current_prompt.replace(f"<lora:{lorabtn}:1.0>", "")else:result = f"{current_prompt} <lora:{lorabtn}:1>"return resultdef create_grid(image_urls):# Download first image to get size98 unmodified lines9910010110210310410510610710810911098 unmodified linesreturn textdef place_lora(current_prompt, lorabtn):pattern = r"<lora:" + lora_name + r":.*?>"if re.search(pattern, current_prompt):return re.sub(pattern, "", current_prompt)else:return current_prompt + "<lora:" + lora_name + ":1>"def create_grid(image_urls):# Download first image to get size
app.py+6-5