mirror of
https://github.com/gradio-app/gradio.git
synced 2025-02-05 11:10:03 +08:00
started test launch work
This commit is contained in:
parent
2557635767
commit
921141c994
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user