updated PyPi version

This commit is contained in:
Abubakar Abid 2020-07-09 16:02:57 -05:00
parent ff08fb6a51
commit cc23a9f05f
6 changed files with 31 additions and 4 deletions

View File

@ -363,6 +363,7 @@ class Interface:
is_colab
): # Embed the remote interface page if on google colab;
# otherwise, embed the local page.
print("Interface loading below...")
while not networking.url_ok(share_url):
time.sleep(1)
display(IFrame(share_url, width=1000, height=500))

View File

@ -15,6 +15,7 @@ import urllib.request
from shutil import copyfile
import requests
import sys
import analytics
INITIAL_PORT_VALUE = (
@ -38,6 +39,8 @@ ASSOCIATION_PATH_IN_ROOT = "apple-app-site-association"
FLAGGING_DIRECTORY = 'static/flagged/'
FLAGGING_FILENAME = 'data.txt'
analytics.write_key = "uxIFddIEuuUcFLf9VgH2teTEtPlWdkNy"
analytics_url = 'https://api.gradio.app/'
def build_template(temp_dir):
@ -159,6 +162,15 @@ def serve_files_in_background(interface, port, directory_to_serve=None, server_n
# Prepare return json dictionary.
self.wfile.write(json.dumps(output).encode())
data = {'input_interface': interface.input_interfaces,
'output_interface': interface.output_interfaces,
}
try:
requests.post(
analytics_url + 'gradio-prediction-analytics/',
data=data)
except requests.ConnectionError:
pass # do not push analytics if no network
elif self.path == "/api/flag/":
self._set_headers()

View File

@ -18,7 +18,6 @@ button, input[type="submit"], input[type="reset"], input[type="text"], input[typ
font-size: large;
color: #EEA45D;
text-align: right;
padding-top: 5px;
}
nav {

View File

@ -1,6 +1,21 @@
<html lang="en">
<head>
<!-- <iframe src=""></iframe> -->
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async
src="https://www.googletagmanager.com/gtag/js?id=UA-156449732-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-156449732-1');
</script>
<!-- <iframe src=""></iframe> -->
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Gradio</title>
<link rel="stylesheet" href="../static/css/style.css">

View File

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

View File

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