made string names of interfaces case insensitive

This commit is contained in:
Abubakar Abid 2020-07-01 11:48:59 -05:00
parent e9d697e108
commit 13ee3abcb6

View File

@ -40,7 +40,7 @@ class Interface:
"""
def get_input_instance(iface):
if isinstance(iface, str):
return gradio.inputs.shortcuts[iface]
return gradio.inputs.shortcuts[iface.lower()]
elif isinstance(iface, gradio.inputs.AbstractInput):
return iface
else:
@ -49,7 +49,7 @@ class Interface:
def get_output_instance(iface):
if isinstance(iface, str):
return gradio.outputs.shortcuts[iface]
return gradio.outputs.shortcuts[iface.lower()]
elif isinstance(iface, gradio.outputs.AbstractOutput):
return iface
else:
@ -264,7 +264,7 @@ class Interface:
if share:
try:
share_url = networking.setup_tunnel(server_port)
print(share_url)
print("External URL:", share_url)
except RuntimeError:
share_url = None
if self.verbose: