From 82e9059aae7ef3584db99d5b353a6839739ba1db Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Sun, 24 Feb 2019 22:45:18 -0800 Subject: [PATCH] removed ngrok --- .gitignore | 1 + Test Notebook.ipynb | 40 +++++++++++++++++++++++++--------------- gradio/networking.py | 3 ++- 3 files changed, 28 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 78d4a9c2bb..f02bcdd0ac 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ staticfiles models/* .models/* gradio_files/* +ngrok* diff --git a/Test Notebook.ipynb b/Test Notebook.ipynb index 3e63ebbb05..9fef82ee7b 100644 --- a/Test Notebook.ipynb +++ b/Test Notebook.ipynb @@ -14,7 +14,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -24,7 +24,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 4, "metadata": { "scrolled": true }, @@ -43,35 +43,45 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "NOTE: Gradio is in beta2 stage, please report all bugs to: a12d@stanford.edu\n", - "Model available locally at: http://localhost:7861/interface.html\n", - "To create a public link, set `share_link=True` in the argument to `launch()`\n" + "NOTE: Gradio is in beta stage, please report all bugs to: a12d@stanford.edu\n", + "Model available locally at: http://localhost:7862/interface.html\n", + "Model available publicly for 8 hours at: http://9fb08e2b.ngrok.io/interface.html\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "127.0.0.1 - - [24/Feb/2019 22:25:21] \"GET /interface.html HTTP/1.1\" 200 -\n", - "127.0.0.1 - - [24/Feb/2019 22:25:21] \"GET /js/all-io.js HTTP/1.1\" 200 -\n", - "127.0.0.1 - - [24/Feb/2019 22:25:21] \"GET /css/bootstrap.min.css HTTP/1.1\" 200 -\n", - "127.0.0.1 - - [24/Feb/2019 22:25:21] \"GET /css/draw-a-digit.css HTTP/1.1\" 200 -\n", - "127.0.0.1 - - [24/Feb/2019 22:25:21] \"GET /js/bootstrap.min.js HTTP/1.1\" 200 -\n", - "127.0.0.1 - - [24/Feb/2019 22:25:21] \"GET /js/bootstrap-notify.min.js HTTP/1.1\" 200 -\n", - "127.0.0.1 - - [24/Feb/2019 22:25:21] \"GET /js/textbox-input.js HTTP/1.1\" 200 -\n", - "127.0.0.1 - - [24/Feb/2019 22:25:21] \"GET /js/textbox-output.js HTTP/1.1\" 200 -\n" + "127.0.0.1 - - [24/Feb/2019 22:39:11] \"GET /interface.html HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [24/Feb/2019 22:39:12] \"GET /js/all-io.js HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [24/Feb/2019 22:39:12] \"GET /css/bootstrap.min.css HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [24/Feb/2019 22:39:12] \"GET /css/draw-a-digit.css HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [24/Feb/2019 22:39:12] \"GET /js/bootstrap.min.js HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [24/Feb/2019 22:39:12] \"GET /js/bootstrap-notify.min.js HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [24/Feb/2019 22:39:12] \"GET /js/textbox-input.js HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [24/Feb/2019 22:39:12] \"GET /js/textbox-output.js HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [24/Feb/2019 22:39:15] \"GET /interface.html HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [24/Feb/2019 22:39:16] \"GET /js/bootstrap.min.js HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [24/Feb/2019 22:39:16] \"GET /js/all-io.js HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [24/Feb/2019 22:39:16] \"GET /css/bootstrap.min.css HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [24/Feb/2019 22:39:16] \"GET /js/textbox-input.js HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [24/Feb/2019 22:39:16] \"GET /css/draw-a-digit.css HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [24/Feb/2019 22:39:16] \"GET /js/bootstrap-notify.min.js HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [24/Feb/2019 22:39:17] \"GET /js/textbox-output.js HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [24/Feb/2019 22:39:17] code 404, message File not found\n", + "127.0.0.1 - - [24/Feb/2019 22:39:17] \"GET /favicon.ico HTTP/1.1\" 404 -\n" ] } ], "source": [ - "iface.launch()" + "iface.launch(share_link=True)" ] } ], diff --git a/gradio/networking.py b/gradio/networking.py index 530a4dba11..aac1540a1f 100644 --- a/gradio/networking.py +++ b/gradio/networking.py @@ -121,6 +121,7 @@ def start_simple_server(directory_to_serve=None): def download_ngrok(): try: zip_file_url = NGROK_ZIP_URLS[sys.platform] + print(zip_file_url) except KeyError: print("Sorry, we don't currently support your operating system, please leave us a note on GitHub, and we'll look into it!") return @@ -148,6 +149,6 @@ def kill_processes(process_ids): if conns.laddr.port in process_ids: proc.send_signal(SIGTERM) # or SIGKILL except AccessDenied: - print("Unable to kill processes, please kill manually.") + pass