Adam Liter
06/05/2024, 5:40 PMService class that just takes an unnamed list as input? If I have something like the following:
@bentoml.service
class ModelService:
def __init__(self):
self.model = ""
@bentoml.api
def predict(self, data: List[str]) -> List[float]
return [self.model.predict(x) for x in data]
Then the API requires input that looks like this:
{data: ["First string", "Second string"]}
Is it possible to have the input instead something like:
["First string", "Second string"]