From 8449d736754c6ad9283f315efa1d6c1220c88abe Mon Sep 17 00:00:00 2001 From: Luna Date: Sun, 4 Aug 2024 16:12:34 -0300 Subject: [PATCH] fix? --- main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 69be1ad..690859b 100644 --- a/main.py +++ b/main.py @@ -106,8 +106,12 @@ class SDInterrogator(Interrogator): log.info("got %d", resp.status) assert resp.status == 200 data = await resp.json() - tags_with_scores = data["caption"] - tags = list(tags_with_scores.keys()) + tags_with_weights = data["caption"] + + tags = [] + + for tag, weight in tags_with_weights.items(): + tags.append(tag) upstream_tags = [tag.replace(" ", "_") for tag in tags] return " ".join(upstream_tags)