tori29umai commited on
Commit
b36fcf5
1 Parent(s): 76ac8f3
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -56,10 +56,10 @@ def main(image_path, model_id):
56
  general_tags = [row[1] for row in rows if row[2] == "0"]
57
 
58
  # タグと評価
59
- NSFW_flag, IP_flag, tag_text = self.evaluate_tags(prob, rating_tags, character_tags, general_tags)
60
  return NSFW_flag, IP_flag, tag_text
61
 
62
- def evaluate_tags(self, prob, rating_tags, character_tags, general_tags):
63
  thresh = 0.35
64
  # NSFW/SFW判定
65
  tag_confidences = {tag: prob[i] for i, tag in enumerate(rating_tags)}
 
56
  general_tags = [row[1] for row in rows if row[2] == "0"]
57
 
58
  # タグと評価
59
+ NSFW_flag, IP_flag, tag_text = evaluate_tags(prob, rating_tags, character_tags, general_tags)
60
  return NSFW_flag, IP_flag, tag_text
61
 
62
+ def evaluate_tags(sprob, rating_tags, character_tags, general_tags):
63
  thresh = 0.35
64
  # NSFW/SFW判定
65
  tag_confidences = {tag: prob[i] for i, tag in enumerate(rating_tags)}