Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -292,9 +292,17 @@ def main():
|
|
292 |
# Generate formatted output
|
293 |
prompts = []
|
294 |
for i, (general_tags, character_tags) in enumerate(results):
|
295 |
-
#
|
296 |
-
|
297 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
298 |
else:
|
299 |
prompts.append(general_part)
|
300 |
|
|
|
292 |
# Generate formatted output
|
293 |
prompts = []
|
294 |
for i, (general_tags, character_tags) in enumerate(results):
|
295 |
+
# Replace underscores with spaces for both character and general tags
|
296 |
+
character_part = ", ".join(
|
297 |
+
tag.replace('_', ' ') for tag in character_tags if tag.lower() not in filter_set
|
298 |
+
)
|
299 |
+
general_part = ", ".join(
|
300 |
+
tag.replace('_', ' ') for tag in general_tags if tag.lower() not in filter_set
|
301 |
+
)
|
302 |
+
|
303 |
+
# Construct the prompt based on the presence of character_part
|
304 |
+
if character_part:
|
305 |
+
prompts.append(f"{character_part}, {general_part}")
|
306 |
else:
|
307 |
prompts.append(general_part)
|
308 |
|