mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-03 01:50:59 +08:00
made string names of interfaces case insensitive
This commit is contained in:
parent
e9d697e108
commit
13ee3abcb6
@ -40,7 +40,7 @@ class Interface:
|
|||||||
"""
|
"""
|
||||||
def get_input_instance(iface):
|
def get_input_instance(iface):
|
||||||
if isinstance(iface, str):
|
if isinstance(iface, str):
|
||||||
return gradio.inputs.shortcuts[iface]
|
return gradio.inputs.shortcuts[iface.lower()]
|
||||||
elif isinstance(iface, gradio.inputs.AbstractInput):
|
elif isinstance(iface, gradio.inputs.AbstractInput):
|
||||||
return iface
|
return iface
|
||||||
else:
|
else:
|
||||||
@ -49,7 +49,7 @@ class Interface:
|
|||||||
|
|
||||||
def get_output_instance(iface):
|
def get_output_instance(iface):
|
||||||
if isinstance(iface, str):
|
if isinstance(iface, str):
|
||||||
return gradio.outputs.shortcuts[iface]
|
return gradio.outputs.shortcuts[iface.lower()]
|
||||||
elif isinstance(iface, gradio.outputs.AbstractOutput):
|
elif isinstance(iface, gradio.outputs.AbstractOutput):
|
||||||
return iface
|
return iface
|
||||||
else:
|
else:
|
||||||
@ -264,7 +264,7 @@ class Interface:
|
|||||||
if share:
|
if share:
|
||||||
try:
|
try:
|
||||||
share_url = networking.setup_tunnel(server_port)
|
share_url = networking.setup_tunnel(server_port)
|
||||||
print(share_url)
|
print("External URL:", share_url)
|
||||||
except RuntimeError:
|
except RuntimeError:
|
||||||
share_url = None
|
share_url = None
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
|
Loading…
Reference in New Issue
Block a user