analytics host name removed

This commit is contained in:
dawoodkhan82 2020-07-09 16:04:42 -04:00
parent 12d3539e1b
commit c1fa6a095a

View File

@ -20,13 +20,11 @@ from IPython import get_ipython
import sys
import weakref
import analytics
import socket
PKG_VERSION_URL = "https://gradio.app/api/pkg-version"
analytics.write_key = "uxIFddIEuuUcFLf9VgH2teTEtPlWdkNy"
analytics_url = 'https://api.gradio.app/'
hostname = socket.gethostname()
ip_address = requests.get('https://api.ipify.org').text
@ -101,15 +99,13 @@ class Interface:
'saliency': saliency,
'live': live,
'capture_session': capture_session,
'host_name': hostname,
'ip_address': ip_address
}
try:
print("try initiated")
requests.post(analytics_url + 'gradio-initiated-analytics/',
data=data)
except requests.ConnectionError:
print("gradio-initiated-analytics/ Connection Error")
print("Connection Error")
def get_config_file(self):
config = {
@ -394,7 +390,6 @@ class Interface:
'is_google_colab': is_colab,
'is_sharing_on': share,
'share_url': share_url,
'host_name': hostname,
'ip_address': ip_address
}
try: