autotag: fix bug when reading file from stdin.
Another attempt at fixing #2. b216057 had a bug where you couldn't pass
a file through stdin because we tried to read the file twice, which we
can't do if the input is a pipe.
This commit is contained in:
@@ -32,8 +32,7 @@ class Autotagger:
|
||||
return
|
||||
|
||||
with self.learn.no_bar(), self.learn.no_logging():
|
||||
images = [PILImage.create(file) for file in files]
|
||||
dl = self.learn.dls.test_dl(images, bs=bs)
|
||||
dl = self.learn.dls.test_dl(files, bs=bs)
|
||||
batch, _ = self.learn.get_preds(dl=dl)
|
||||
|
||||
for scores in batch:
|
||||
|
||||
Reference in New Issue
Block a user