From 57cef1bb6673db4e5dd792f4c4fe3487de091e76 Mon Sep 17 00:00:00 2001 From: Zhang Minghan Date: Thu, 25 Apr 2024 11:29:38 +0800 Subject: [PATCH] fix: fix vercel deployment engines (using node version `18.x`) --- main.py | 2 +- package.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 package.json diff --git a/main.py b/main.py index d8d3ce6..7bfb2ed 100644 --- a/main.py +++ b/main.py @@ -28,7 +28,7 @@ def favicon(): @app.post("/upload") -async def upload(file: UploadFile = File(...), model: str = Form(...)): +async def upload(file: UploadFile = File(...), model: str = Form(default="")): """Accepts file and returns its contents.""" try: diff --git a/package.json b/package.json new file mode 100644 index 0000000..d31e7fe --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "engines": { + "node": "18.x" + } +}