Fix AttributeError

This commit is contained in:
dokutan
2022-06-22 20:11:46 +02:00
committed by GitHub
parent a4db87e8a0
commit 22e1f2be7d
+2 -2
View File
@@ -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):