localhost only reaches inside the container, use service name or container name of tensorflow to reach it from the script container

http://tensorflow-servings:8501/v1/models/model/1:predict