diff --git a/gradio/interpretation.py b/gradio/interpretation.py index ba029bd8c6..03a21f13b8 100644 --- a/gradio/interpretation.py +++ b/gradio/interpretation.py @@ -6,7 +6,6 @@ import numpy as np expected_types = { Image: "numpy", - Textbox: "str" } def default(separator=" ", n_segments=20): diff --git a/gradio/networking.py b/gradio/networking.py index dc7a8d6575..2ac005c596 100644 --- a/gradio/networking.py +++ b/gradio/networking.py @@ -143,7 +143,9 @@ def interpret(): processed_input = [] for i, x in enumerate(raw_input): input_interface = copy.deepcopy(app.interface.input_interfaces[i]) - input_interface.type = gr.interpretation.expected_types[type(input_interface)] + interface_type = type(input_interface) + if interface_type in gr.interpretation.expected_types: + input_interface.type = [gr.interpretation.expected_types[interface_type]] processed_input.append(input_interface.preprocess(x)) else: processed_input = [input_interface.preprocess(raw_input[i])