Skip to content

Instantly share code, notes, and snippets.

apiVersion: v1
kind: Service
app: istio-ingressgateway-ext-worker-0
istio: ingressgateway
name: istio-ingressgateway-ext-worker-0
namespace: istio-system
annotations: ing
niektemme / istio-values.yaml
Created July 3, 2020 10:08
istio helm values for ingress gateway
enabled: true
type: ClusterIP #change to NodePort, ClusterIP or LoadBalancer if need be
- port: 80
targetPort: 80
name: http2
- port: 443
name: https
import sys
import tensorflow as tf
def predictint(imvalue):
This function returns the predicted integer.
The imput is the pixel values from the imageprepare() function.
# Define the model (same as when creating the model file)
with tf.Session() as sess:
saver.restore(sess, "model.ckpt")
#print ("Model restored.")
return prediction.eval(feed_dict={x: [imvalue]}, session=sess)
with tf.Session() as sess:
saver.restore(sess, "model2.ckpt")
#print ("Model restored.")
return prediction.eval(feed_dict={x: [imvalue],keep_prob: 1.0}, session=sess)
from PIL import Image, ImageFilter
def imageprepare(argv):
This function returns the pixel values.
The imput is a png file location.
im ='L')
width = float(im.size[0])
height = float(im.size[1])
sudo pip install Pillow
saver.restore(sess, "model.ckpt")
save_path =, “model.ckpt”)
print (“Model saved in file: “, save_path)
saver = tf.train.Saver()