Skip to content

Instantly share code, notes, and snippets.

@marvinhoxha
Created August 29, 2022 11:53
Show Gist options
  • Save marvinhoxha/012cf254113176b0b856a1f0e2ed8848 to your computer and use it in GitHub Desktop.
Save marvinhoxha/012cf254113176b0b856a1f0e2ed8848 to your computer and use it in GitHub Desktop.
def send_client_request(seldon_client, image):
client_prediction = seldon_client.predict(
data=image,
deployment_name="seldon-dogbreed",
payload_type="ndarray",
)
return client_prediction
if env == "COMPOSE":
sc = SeldonClient(
gateway="seldon",
transport="rest",
gateway_endpoint="seldon:9000",
microservice_endpoint="seldon:9000",
)
elif env == "KUBERNETES":
sc = SeldonClient(
gateway="ambassador",
transport="rest",
gateway_endpoint="ambassador.ambassador.svc",
namespace="seldon",
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment