Closed tzktz closed 8 months ago
Yep, you wanna do something like this:
from cog import BasePredictor, BaseModel, File, Path
class Output(BaseModel):
cropped_table: Path
json: Path
class Predictor(BasePredictor):
def predict(self) -> Output:
...
return Output(cropped_table=..., json=...)
Bear in mind that cog has a Path
that differs from (extends?) the built-in Python path.
See https://github.com/replicate/cog/blob/main/docs/python.md#returning-an-object
i want to return two output prediction in below code..
my run comment is : $ cog predict -i file_path=@test4.jpg
but i got error..when i use single prediction it worked smoothly..(ex. return json_path ) my cog version is 0.8.6
can anyone fix this..thx in advance!!! @mattt @zeke