Skip to content

Commit

Permalink
Merge branch 'new-modalities' into add-audio
Browse files Browse the repository at this point in the history
  • Loading branch information
philschmid authored Feb 17, 2022
2 parents 87e1658 + 1e57715 commit 2ecd873
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/sagemaker_huggingface_inference_toolkit/content_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
BMP = "image/bmp"
GIF = "image/gif"
WEBP = "image/webp"
VISION_TYPES = [JPEG, PNG, TIFF, BMP, GIF, WEBP]
X_IMAGE = "image/x-image"
VISION_TYPES = [JPEG, PNG, TIFF, BMP, GIF, WEBP,X_IMAGE]
# Speech Mime-Types
FLAC = "audio/x-flac"
MP3 = "audio/mpeg"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ def encode_csv(content): # type: (str) -> np.array
content_types.BMP: decode_image,
content_types.GIF: decode_image,
content_types.WEBP: decode_image,
content_types.X_IMAGE: decode_image,
# audio mime-types
content_types.FLAC: decode_audio,
content_types.MP3: decode_audio,
Expand Down
2 changes: 1 addition & 1 deletion tests/integ/test_models_from_hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def get_all_ecr_images(registry_id, repository_name, result_key):
@pytest.mark.parametrize(
"device",
[
"gpu",
# "gpu",
"cpu",
],
)
Expand Down

0 comments on commit 2ecd873

Please sign in to comment.