Spaces:
Runtime error
Runtime error
Update utils.py
Browse files
utils.py
CHANGED
@@ -57,9 +57,9 @@ def place_lora(current_prompt, lora_name):
|
|
57 |
pattern = r"<lora:" + lora_name + r":.*?>"
|
58 |
|
59 |
if re.search(pattern, current_prompt):
|
60 |
-
|
61 |
else:
|
62 |
-
|
63 |
|
64 |
|
65 |
def plaintext_to_html(text, classname=None):
|
|
|
57 |
pattern = r"<lora:" + lora_name + r":.*?>"
|
58 |
|
59 |
if re.search(pattern, current_prompt):
|
60 |
+
return re.sub(pattern, "", current_prompt)
|
61 |
else:
|
62 |
+
return current_prompt + " <lora:" + lora_name + ":1> "
|
63 |
|
64 |
|
65 |
def plaintext_to_html(text, classname=None):
|