added ngrok check for linux

This commit is contained in:
Abubakar Abid 2019-02-24 23:43:46 -08:00
parent a2903b115b
commit e299b83016
6 changed files with 28 additions and 40 deletions

View File

@ -2,14 +2,13 @@
"cells": [
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Model available publicly for 8 hours at: http://22c0b84e.ngrok.io/interface.html\n",
"The autoreload extension is already loaded. To reload it, use:\n",
" %reload_ext autoreload\n"
]
@ -24,7 +23,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
@ -34,7 +33,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 4,
"metadata": {
"scrolled": true
},
@ -53,7 +52,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 5,
"metadata": {},
"outputs": [
{
@ -61,43 +60,32 @@
"output_type": "stream",
"text": [
"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: https://81712345.ngrok.io/interface.html\n"
"Model available locally at: http://localhost:7861/interface.html\n",
"Model available publicly for 8 hours at: http://3dc1c1d4.ngrok.io/interface.html\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"127.0.0.1 - - [24/Feb/2019 23:05:10] \"GET /interface.html HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:05:10] \"GET /js/all-io.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:05:10] \"GET /css/bootstrap.min.css HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:05:10] \"GET /css/draw-a-digit.css HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:05:10] \"GET /js/bootstrap.min.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:05:10] \"GET /js/bootstrap-notify.min.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:05:10] \"GET /js/textbox-input.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:05:10] \"GET /js/textbox-output.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:05:28] \"GET /interface.html HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:05:29] \"GET /js/all-io.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:05:29] \"GET /css/bootstrap.min.css HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:05:30] \"GET /css/draw-a-digit.css HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:05:30] \"GET /js/bootstrap.min.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:05:30] \"GET /js/bootstrap-notify.min.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:05:30] \"GET /js/textbox-input.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:05:30] \"GET /js/textbox-output.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:05:31] code 404, message File not found\n",
"127.0.0.1 - - [24/Feb/2019 23:05:31] \"GET /favicon.ico HTTP/1.1\" 404 -\n",
"127.0.0.1 - - [24/Feb/2019 23:06:15] \"GET /interface.html HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:06:24] \"GET /interface.html HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:06:24] \"GET /js/all-io.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:06:24] \"GET /js/bootstrap.min.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:06:24] \"GET /css/bootstrap.min.css HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:06:24] \"GET /js/bootstrap-notify.min.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:06:25] \"GET /css/draw-a-digit.css HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:06:25] \"GET /js/textbox-input.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:06:25] \"GET /js/textbox-output.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:06:26] code 404, message File not found\n",
"127.0.0.1 - - [24/Feb/2019 23:06:26] \"GET /favicon.ico HTTP/1.1\" 404 -\n"
"127.0.0.1 - - [24/Feb/2019 23:32:47] \"GET /interface.html HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:32:47] \"GET /css/bootstrap.min.css HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:32:47] \"GET /css/draw-a-digit.css HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:32:48] \"GET /js/all-io.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:32:48] \"GET /js/bootstrap.min.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:32:48] \"GET /js/bootstrap-notify.min.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:32:48] \"GET /js/textbox-input.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:32:48] \"GET /js/textbox-output.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:32:50] \"GET /interface.html HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:32:51] \"GET /js/all-io.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:32:51] \"GET /css/bootstrap.min.css HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:32:51] \"GET /css/draw-a-digit.css HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:32:51] \"GET /js/bootstrap.min.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:32:51] \"GET /js/bootstrap-notify.min.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:32:52] \"GET /js/textbox-output.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:32:52] \"GET /js/textbox-input.js HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [24/Feb/2019 23:32:52] code 404, message File not found\n",
"127.0.0.1 - - [24/Feb/2019 23:32:52] \"GET /favicon.ico HTTP/1.1\" 404 -\n"
]
}
],

View File

@ -134,7 +134,7 @@ def download_ngrok():
def setup_ngrok(local_port, api_url=NGROK_TUNNELS_API_URL):
if not(os.path.isfile('ngrok.exe')):
if not(os.path.isfile('ngrok.exe') or os.path.isfile('ngrok')):
download_ngrok()
if sys.platform == 'win32':
subprocess.Popen(['ngrok', 'http', str(local_port)])

View File

@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: gradio
Version: 0.2.0
Version: 0.2.1
Summary: Python library for easily interacting with trained machine learning models
Home-page: https://github.com/abidlabs/gradio
Author: Abubakar Abid

View File

@ -134,7 +134,7 @@ def download_ngrok():
def setup_ngrok(local_port, api_url=NGROK_TUNNELS_API_URL):
if not(os.path.isfile('ngrok.exe')):
if not(os.path.isfile('ngrok.exe') or os.path.isfile('ngrok')):
download_ngrok()
if sys.platform == 'win32':
subprocess.Popen(['ngrok', 'http', str(local_port)])

View File

@ -5,7 +5,7 @@ except ImportError:
setup(
name='gradio',
version='0.2.0',
version='0.2.1',
include_package_data=True,
description='Python library for easily interacting with trained machine learning models',
author='Abubakar Abid',