From 22e1f2be7d49b5092ed2b1c6b6e90b6ac9d2b46f Mon Sep 17 00:00:00 2001 From: dokutan <54861821+dokutan@users.noreply.github.com> Date: Wed, 22 Jun 2022 20:11:46 +0200 Subject: [PATCH] Fix AttributeError --- autotag | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autotag b/autotag index 1b9cdd9..5e39fce 100755 --- a/autotag +++ b/autotag @@ -23,11 +23,11 @@ def main(file, threshold, limit, bs, group_tags, model): for filepath, tags in zip(filepaths, predictions): if group_tags: - data = { "filename": filepath.name, "tags": tags } + data = { "filename": filepath, "tags": tags } click.echo(json.dumps(data)) else: for tag, score in tags.items(): - data = { "filename": filepath.name, "tag": tag, "score": score } + data = { "filename": filepath, "tag": tag, "score": score } click.echo(json.dumps(data)) def get_filepaths(paths):