This commit is contained in:
Abubakar Abid 2020-06-11 14:37:15 -05:00
parent ec7b1b73ee
commit 6bcfe444bb
2 changed files with 2 additions and 1 deletions

View File

@ -140,7 +140,7 @@ def serve_files_in_background(interface, port, directory_to_serve=None):
predictions = []
for predict_fn in interface.predict:
prediction = predict_fn(*processed_input)
if len(interface.output_interfaces) == 1:
if len(interface.output_interfaces) / len(interface.predict) == 1:
prediction = [prediction]
predictions.extend(prediction)
processed_output = [output_interface.postprocess(predictions[i]) for i, output_interface in enumerate(interface.output_interfaces)]

View File

@ -126,6 +126,7 @@ class Image(AbstractOutput):
def postprocess(self, prediction):
"""
"""
print(prediction.shape)
return preprocessing_utils.encode_array_to_base64(prediction)
def rebuild_flagged(self, dir, msg):