Wrap request in sagemaker model_server
from flask import Flask, Response, request
+from bentoml.types import HTTPRequest
+
def setup_bento_service_api_route(app, api):
def view_function():
- return api.handle_request(request)
+ req = HTTPRequest.from_flask_request(request)
+ response = api.handle_request(req)
+ return response.to_flask_response()
app.add_url_rule(
rule="/invocations",
