mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-06 10:25:17 +08:00
added test inputs to all input interfaces except File
This commit is contained in:
parent
e3baa56514
commit
1d27d9f93d
File diff suppressed because one or more lines are too long
@ -256,9 +256,19 @@ class Interface:
|
||||
|
||||
def test_launch(self):
|
||||
for predict_fn in self.predict:
|
||||
print("Testing {}()...".format(predict_fn.__name__), end=' ')
|
||||
print("Testing: {}()...".format(predict_fn.__name__), end=' ')
|
||||
|
||||
raw_input = []
|
||||
for input_interface in self.input_interfaces:
|
||||
if input_interface.test_input is None:
|
||||
break
|
||||
else:
|
||||
raw_input.append(input_interface.test_input)
|
||||
else:
|
||||
self.process(raw_input)
|
||||
print("PASSED")
|
||||
|
||||
print("SKIPPED")
|
||||
|
||||
def launch(self, inline=None, inbrowser=None, share=False, debug=False):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user