mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-21 01:01:05 +08:00
changes
This commit is contained in:
parent
ec7b1b73ee
commit
6bcfe444bb
@ -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)]
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user