John6666 commited on
Commit
e071286
1 Parent(s): 1731cc9

Upload tagger.py

Browse files
Files changed (1) hide show
  1. tagger.py +1 -1
tagger.py CHANGED
@@ -436,7 +436,7 @@ def predict_tags(image: Image.Image, general_threshold: float = 0.3, character_t
436
 
437
 
438
  def predict_tags_wd(image: Image.Image, input_tags: str, algo: list[str], general_threshold: float = 0.3, character_threshold: float = 0.8):
439
- if algo and not "Use WD Tagger" in algo:
440
  return "", "", input_tags, gr.update(interactive=True),
441
  return predict_tags(image, general_threshold, character_threshold)
442
 
 
436
 
437
 
438
  def predict_tags_wd(image: Image.Image, input_tags: str, algo: list[str], general_threshold: float = 0.3, character_threshold: float = 0.8):
439
+ if not "Use WD Tagger" in algo and len(algo) != 0:
440
  return "", "", input_tags, gr.update(interactive=True),
441
  return predict_tags(image, general_threshold, character_threshold)
442