From 8ca97e4bcfb91ab4da5521c571f99882be6250a4 Mon Sep 17 00:00:00 2001 From: aliabd Date: Wed, 21 Jul 2021 13:27:34 -0700 Subject: [PATCH] Private link non expiry message --- gradio/interface.py | 4 +++- gradio/strings.py | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gradio/interface.py b/gradio/interface.py index 7eb57dd781..0d897fc773 100644 --- a/gradio/interface.py +++ b/gradio/interface.py @@ -536,7 +536,9 @@ class Interface: self.share = share if share: - if not private_endpoint: + if private_endpoint: + print(strings.en["PRIVATE_LINK_MESSAGE"]) + else: print(strings.en["SHARE_LINK_MESSAGE"]) try: share_url = networking.setup_tunnel(server_port, private_endpoint) diff --git a/gradio/strings.py b/gradio/strings.py index bf802ad678..ab0da99b51 100644 --- a/gradio/strings.py +++ b/gradio/strings.py @@ -21,6 +21,7 @@ en = { "To turn off, set debug=False in launch().", "COLAB_DEBUG_FALSE": "Colab notebook detected. To show errors in colab notebook, set debug=True in launch()", "SHARE_LINK_MESSAGE": "This share link will expire in 24 hours. If you need a permanent link, visit: https://gradio.app/introducing-hosted (NEW!)", + "PRIVATE_LINK_MESSAGE": "Since this is a private endpoint, this share link will never expire.", "SHARE_LINK_DISPLAY": "Running on External URL: {}", "INLINE_DISPLAY_BELOW": "Interface loading below...", "MEDIA_PERMISSIONS_IN_COLAB": "Your interface requires microphone or webcam permissions - this may cause issues in Colab. Use the External URL in case of issues.",