We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20153a7 commit b009dbcCopy full SHA for b009dbc
src/huggingface_inference_toolkit/webservice_starlette.py
@@ -111,9 +111,10 @@ async def predict(request):
111
)
112
113
# response extracts content from request
114
- accept = request.headers.get("accept", None)
+ accept = request.headers.get("accept")
115
if accept is None or accept == "*/*":
116
- accept = "application/json"
+ accept = os.environ.get("DEFAULT_ACCEPT", "application/json")
117
+ logger.info("Request accepts %s", accept)
118
# deserialized and resonds with json
119
serialized_response_body = ContentType.get_serializer(accept).serialize(
120
pred, accept
0 commit comments