File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 11build :
2- python_version : " 3.8"
2+ python_version : " 3.13"
3+ cog_runtime : true
34predict : " predict.py:Predictor"
Original file line number Diff line number Diff line change 11build :
2- python_version : " 3.11"
2+ python_version : " 3.13"
3+ cog_runtime : true
34predict : " predict.py:Predictor"
Original file line number Diff line number Diff line change 11from cog import BasePredictor , Path
2+ from tempfile import NamedTemporaryFile
23
34class Predictor (BasePredictor ):
45 def predict (self ) -> Path :
5- return Path ("hello.webp" )
6+ # Copy output file, workaround for some cog version deleting output after upload
7+ with open ("/tmp/hello.webp" , "wb" ) as f :
8+ f .write (open ("hello.webp" , "rb" ).read ())
9+ return Path ("/tmp/hello.webp" )
You can’t perform that action at this time.
0 commit comments