Created
August 29, 2022 11:53
-
-
Save marvinhoxha/012cf254113176b0b856a1f0e2ed8848 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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