Upload 6 files
Browse files- image_generator.py +1 -1
- prompt_generator.py +1 -1
image_generator.py
CHANGED
|
@@ -270,7 +270,7 @@ class ImageGenerator:
|
|
| 270 |
cleaned = re.sub(r'with\s+the\s+words', '', cleaned, flags=re.IGNORECASE)
|
| 271 |
|
| 272 |
# Remove quotes which might encourage text
|
| 273 |
-
cleaned = re.sub(r'["\'
|
| 274 |
|
| 275 |
# Add negative prompt elements directly in the prompt
|
| 276 |
cleaned += ", no text, no words, no writing, no letters, no numbers, no watermark"
|
|
|
|
| 270 |
cleaned = re.sub(r'with\s+the\s+words', '', cleaned, flags=re.IGNORECASE)
|
| 271 |
|
| 272 |
# Remove quotes which might encourage text
|
| 273 |
+
cleaned = re.sub(r'["\'].*?["\']', '', cleaned)
|
| 274 |
|
| 275 |
# Add negative prompt elements directly in the prompt
|
| 276 |
cleaned += ", no text, no words, no writing, no letters, no numbers, no watermark"
|
prompt_generator.py
CHANGED
|
@@ -198,7 +198,7 @@ class PromptGenerator:
|
|
| 198 |
cleaned = re.sub(r'title', '', cleaned, flags=re.IGNORECASE)
|
| 199 |
|
| 200 |
# Remove quotes which might encourage text
|
| 201 |
-
cleaned = re.sub(r'["\'
|
| 202 |
|
| 203 |
return cleaned
|
| 204 |
|
|
|
|
| 198 |
cleaned = re.sub(r'title', '', cleaned, flags=re.IGNORECASE)
|
| 199 |
|
| 200 |
# Remove quotes which might encourage text
|
| 201 |
+
cleaned = re.sub(r'["\'].*?["\']', '', cleaned)
|
| 202 |
|
| 203 |
return cleaned
|
| 204 |
|