will this work with vercel? who knows

This commit is contained in:
Ray 2026-06-26 11:43:36 +00:00 • committed by GitHub
parent f46cd2416a
commit 4577e9a2fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 1 deletions

View file

@ -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)

14
vercel.json Normal file
View file

@ -0,0 +1,14 @@
{
"version": 2,
"functions": {
"api/index.py": {
"runtime": "python3.11"
}
},
"routes": [
{
"src": "/(.*)",
"dest": "api/index.py"
}
]
}