We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8706049 commit c71a4c5Copy full SHA for c71a4c5
src/huggingface_inference_toolkit/serialization/base.py
@@ -44,6 +44,12 @@ def get_deserializer(content_type: str, task: str):
44
return Audioer
45
elif "image" in task:
46
return Imager
47
+ message = f"""
48
+ Content type "{content_type}" not supported for task {task}.
49
+ Supported content types are:
50
+ {", ".join(list(content_type_mapping.keys()))}
51
+ """
52
+ raise Exception(message)
53
54
# Extract media type from content type
55
extracted = content_type.split(";")[0]
0 commit comments