@@ -52,7 +52,7 @@ def deserialize(self, stream, content_type):
52
52
@property
53
53
@abc .abstractmethod
54
54
def ACCEPT (self ):
55
- """The content type that is expected from the inference endpoint."""
55
+ """The content types that are expected from the inference endpoint."""
56
56
57
57
58
58
class StringDeserializer (BaseDeserializer ):
@@ -161,7 +161,7 @@ def deserialize(self, stream, content_type):
161
161
class NumpyDeserializer (BaseDeserializer ):
162
162
"""Deserialize a stream of data in the .npy format."""
163
163
164
- ACCEPT = ["application/x-npy" ]
164
+ ACCEPT = ["application/x-npy" , "text/csv" , "application/json" ]
165
165
166
166
def __init__ (self , dtype = None , allow_pickle = True ):
167
167
"""Initialize the dtype and allow_pickle arguments.
@@ -250,7 +250,7 @@ def deserialize(self, stream, content_type):
250
250
class JSONLinesDeserializer (BaseDeserializer ):
251
251
"""Deserialize JSON lines data from an inference endpoint."""
252
252
253
- ACCEPT = "application/jsonlines"
253
+ ACCEPT = [ "application/jsonlines" ]
254
254
255
255
def deserialize (self , stream , content_type ):
256
256
"""Deserialize JSON lines data from an inference endpoint.
0 commit comments