vyles commited on
Commit
473eb00
·
verified ·
1 Parent(s): 273537b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -24,13 +24,14 @@ def fetch_tags(image_url):
24
  character = data.get('tag_string_character', 'N/A').replace('_', ' ')
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}'
34
 
35
  return character, origin, formatted_tags, prompt
36
 
 
24
  character = data.get('tag_string_character', 'N/A').replace('_', ' ')
25
  origin = data.get('tag_string_copyright', 'N/A').replace('_', ' ')
26
  tags = data.get('tag_string_general', '').replace('_', ' ')
27
+ artist = data.get('tag_string_artist', '').replace('_', ' ')
28
 
29
  # Split tags into a list and join with commas
30
  tag_list = tags.split() # Split on whitespace to preserve multi-word tags
31
  formatted_tags = ', '.join(tag_list) # Join with comma and space
32
 
33
  # Prepare prompt with cleaned-up fields
34
+ prompt = f'{artist}, {character}, {origin}, {formatted_tags}'
35
 
36
  return character, origin, formatted_tags, prompt
37