Spaces:
Running
on
Zero
Running
on
Zero
tori29umai
commited on
Commit
•
b36fcf5
1
Parent(s):
76ac8f3
Update
Browse files
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 =
|
60 |
return NSFW_flag, IP_flag, tag_text
|
61 |
|
62 |
-
def evaluate_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)}
|