Update README to use a smaller package

Use astor instead of tensorflow for example package to install. Tensorflow is too large and takes too long, it is not a good example package.
This commit is contained in:
Jonathan Zhu 2019-10-31 10:38:15 -07:00 коммит произвёл GitHub
Родитель ddaa0f8aee
Коммит 97ab5737b6
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 7 добавлений и 8 удалений

Просмотреть файл

@ -214,18 +214,17 @@ import sqlmlutils
# connection = sqlmlutils.ConnectionInfo(driver="ODBC Driver 13 for SQL Server", server="localhost", database="AirlineTestDB", uid="username", pwd="password")
connection = sqlmlutils.ConnectionInfo(server="localhost", database="AirlineTestDB")
sqlpy = sqlmlutils.SQLPythonExecutor(connection)
pkgmanager = sqlmlutils.SQLPackageManager(connection)
pkgmanager.install("astor")
def use_tensorflow():
import tensorflow as tf
node1 = tf.constant(3.0, tf.float32)
return str(node1.dtype)
def import_astor():
import astor
pkgmanager.install("tensorflow")
val = sqlpy.execute_function_in_sql(use_tensorflow)
# import the astor package to make sure it installed properly
sqlpy = sqlmlutils.SQLPythonExecutor(connection)
val = sqlpy.execute_function_in_sql(import_astor)
pkgmanager.uninstall("tensorflow")
pkgmanager.uninstall("astor")
```