Created
March 11, 2023 16:53
-
-
Save dkatz23238/355153cd162886ce51f61b5746d6a2f2 to your computer and use it in GitHub Desktop.
Calling SML On Premises
This file contains 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
import requests | |
# Load the image | |
img = open("image.png", "rb") | |
# Send image to the /predict endpoint | |
response = requests.post( | |
"http://localhost:8001/predict", | |
files={ | |
"document_image": img | |
} | |
) | |
img.close() | |
print(test_response.json()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For self signed certificate the code becomes: