Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -25,8 +25,9 @@ def fetch_tags(image_url):
|
|
25 |
origin = data.get('tag_string_copyright', 'N/A').replace('_', ' ')
|
26 |
tags = data.get('tag_string_general', '').replace('_', ' ')
|
27 |
|
28 |
-
#
|
29 |
-
|
|
|
30 |
|
31 |
# Prepare prompt with cleaned-up fields
|
32 |
prompt = f'{character}, {origin}, {formatted_tags}'
|
|
|
25 |
origin = data.get('tag_string_copyright', 'N/A').replace('_', ' ')
|
26 |
tags = data.get('tag_string_general', '').replace('_', ' ')
|
27 |
|
28 |
+
# Split tags into a list and join with commas
|
29 |
+
tag_list = tags.split() # Split on whitespace to preserve multi-word tags
|
30 |
+
formatted_tags = ', '.join(tag_list) # Join with comma and space
|
31 |
|
32 |
# Prepare prompt with cleaned-up fields
|
33 |
prompt = f'{character}, {origin}, {formatted_tags}'
|