mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-09 02:00:44 +08:00
updated PyPi version
This commit is contained in:
parent
ff08fb6a51
commit
cc23a9f05f
@ -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))
|
||||
|
@ -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()
|
||||
|
@ -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 {
|
||||
|
@ -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">
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user