Skip to content

Commit

Permalink
fix(client): fix check input function
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxiao committed May 28, 2020
1 parent e1e42f0 commit 76bd4e6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jina/clients/python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ def check_input(input_fn: Union[Iterator['jina_pb2.Document'], Iterator[bytes],
:param input_fn: the input function
:param input_type: if the input data is in protobuf Document format, or in raw bytes, or data uri
"""
if hasattr(input_fn, '__call__'):
input_fn = input_fn()

kwargs = {'data': input_fn}

try:
Expand Down

0 comments on commit 76bd4e6

Please sign in to comment.