mirror of
https://github.com/wassname/ray.git
synced 2026-07-07 16:17:07 +08:00
[Serve] Migrate from Flask.Request to Starlette Request (#12852)
This commit is contained in:
@@ -54,9 +54,9 @@ class BoostingModel:
|
||||
with open(LABEL_PATH) as f:
|
||||
self.label_list = json.load(f)
|
||||
|
||||
def __call__(self, flask_request):
|
||||
payload = flask_request.json
|
||||
print("Worker: received flask request with data", payload)
|
||||
async def __call__(self, starlette_request):
|
||||
payload = await starlette_request.json()
|
||||
print("Worker: received starlette request with data", payload)
|
||||
|
||||
input_vector = [
|
||||
payload["sepal length"],
|
||||
|
||||
Reference in New Issue
Block a user