Skip to content

Commit

Permalink
update: server
Browse files Browse the repository at this point in the history
Vincentqyw committed Oct 6, 2024
1 parent 5f67ed4 commit efc3830
Showing 2 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/server.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# server.py
import sys
from pathlib import Path
from typing import Union

@@ -10,9 +11,12 @@

from pydantic import BaseModel

sys.path.append(str(Path(__file__).parent.parent))

from ui.api import ImageMatchingAPI
from ui.utils import DEVICE


class ImageInfo(BaseModel):
image_path: str
max_keypoints: int
18 changes: 18 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"builds": [
{
"src": "api/server.py",
"use": "@vercel/python",
"config": {
"maxLambdaSize": "10gb",
"runtime": "python3.10"
}
}
],
"routes": [
{
"src": "/(.*)",
"dest": "api/server.py"
}
]
}

0 comments on commit efc3830

Please sign in to comment.