From 4577e9a2fc470a6766e474ec26089f16be0733f7 Mon Sep 17 00:00:00 2001 From: Ray Date: Fri, 26 Jun 2026 11:43:36 +0000 Subject: [PATCH] will this work with vercel? who knows --- app.py => api/index.py | 2 +- vercel.json | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) rename app.py => api/index.py (93%) create mode 100644 vercel.json diff --git a/app.py b/api/index.py similarity index 93% rename from app.py rename to api/index.py index 0198c45..f3291c7 100644 --- a/app.py +++ b/api/index.py @@ -6,7 +6,7 @@ from flask import Flask BASE_DIR = os.path.dirname(os.path.abspath(__file__)) -model_path = os.path.join(BASE_DIR, "models/main.pkl") +model_path = os.path.join(BASE_DIR, "models", "main.pkl") # to get your model: joblib.dump(model, "model.pkl") model = joblib.load(model_path) diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..ef9707d --- /dev/null +++ b/vercel.json @@ -0,0 +1,14 @@ +{ + "version": 2, + "functions": { + "api/index.py": { + "runtime": "python3.11" + } + }, + "routes": [ + { + "src": "/(.*)", + "dest": "api/index.py" + } + ] +} \ No newline at end of file