Yan
commited on
Commit
·
c589fdd
1
Parent(s):
05b89d7
removed explicit HF token because I'm such a noob
Browse files- .gitattributes +2 -0
- endpoint_tester.py +4 -2
- test.png → test.jpeg +2 -2
.gitattributes
CHANGED
@@ -34,3 +34,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
*.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
*.png filter=lfs diff=lfs merge=lfs -text
|
37 |
+
*.jpg filter=lfs diff=lfs merge=lfs -text
|
38 |
+
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
endpoint_tester.py
CHANGED
@@ -6,7 +6,7 @@ from PIL import Image
|
|
6 |
from io import BytesIO
|
7 |
|
8 |
ENDPOINT_URL = "https://j0thokqylseue22z.us-east-1.aws.endpoints.huggingface.cloud" # your endpoint url
|
9 |
-
HF_TOKEN = "
|
10 |
|
11 |
# helper image utils
|
12 |
def encode_image(image_path):
|
@@ -32,6 +32,8 @@ def predict(image):
|
|
32 |
return response.json()
|
33 |
|
34 |
prediction = predict(
|
35 |
-
image = "test.
|
36 |
)
|
|
|
|
|
37 |
|
|
|
6 |
from io import BytesIO
|
7 |
|
8 |
ENDPOINT_URL = "https://j0thokqylseue22z.us-east-1.aws.endpoints.huggingface.cloud" # your endpoint url
|
9 |
+
HF_TOKEN = "#######################" # your huggingface token `hf_xxx`
|
10 |
|
11 |
# helper image utils
|
12 |
def encode_image(image_path):
|
|
|
32 |
return response.json()
|
33 |
|
34 |
prediction = predict(
|
35 |
+
image = "test.jpeg"
|
36 |
)
|
37 |
+
print(prediction[1])
|
38 |
+
print(prediction[2])
|
39 |
|
test.png → test.jpeg
RENAMED
File without changes
|