Spaces:
Runtime error
Runtime error
fix case where prompts end in semicolon
Browse files
app.py
CHANGED
@@ -118,7 +118,7 @@ def generate_images(prompts, pw, model):
|
|
118 |
users = [] # adds the user to the label
|
119 |
|
120 |
# Split the prompts string into individual prompts based on semicolon separation
|
121 |
-
prompts_list = prompts.split(';')
|
122 |
|
123 |
for entry in prompts_list:
|
124 |
entry_parts = entry.split('-', 1) # Split by the first dash found
|
|
|
118 |
users = [] # adds the user to the label
|
119 |
|
120 |
# Split the prompts string into individual prompts based on semicolon separation
|
121 |
+
prompts_list = [prompt for prompt in prompts.split(';') if prompt]
|
122 |
|
123 |
for entry in prompts_list:
|
124 |
entry_parts = entry.split('-', 1) # Split by the first dash found
|