From 8610cf87ba5541d53c5ae720e801aa2413fca498 Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Thu, 27 Aug 2020 10:29:47 -0500 Subject: [PATCH] started test launch work --- gradio/interface.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gradio/interface.py b/gradio/interface.py index 2a5140737c..2c7232a75a 100644 --- a/gradio/interface.py +++ b/gradio/interface.py @@ -193,10 +193,11 @@ class Interface: return config - def process(self, raw_input): + def process(self, raw_input, predict_fn=None): """ :param raw_input: a list of raw inputs to process and apply the prediction(s) on. + :param predict_fn: which function to process. If not provided, all of the model functions are used. :return: processed output: a list of processed outputs to return as the prediction(s). @@ -253,6 +254,12 @@ class Interface: thread.keep_running = False networking.url_ok(path_to_local_server) + def test_launch(self): + for predict_fn in self.predict: + print("Testing {}()...".format(predict_fn.__name__), end=' ') + + + def launch(self, inline=None, inbrowser=None, share=False, debug=False): """ Parameters