Skip to content

Commit

Permalink
predict now yields
Browse files Browse the repository at this point in the history
  • Loading branch information
zsxkib committed Sep 18, 2023
1 parent cb87929 commit 8ef3f1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://github.com/replicate/cog/blob/main/docs/python.md

from types import SimpleNamespace
from typing import List
from typing import List, Generator
import subprocess
import torch
import torchvision.transforms.functional as TF
Expand Down Expand Up @@ -655,7 +655,7 @@ def predict(
subprocess.run(cmd)

# Append the output path and prepare for the next iteration if needed
output_paths.append(Path(mp4_outname))
mp4 = mp4_outname
yield Path(mp4_outname)

return output_paths

0 comments on commit 8ef3f1b

Please sign in to comment.