mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-21 02:19:59 +08:00
changes
This commit is contained in:
parent
0528ed67aa
commit
13a82994bc
@ -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