From 295362f7e1bc484d2d0a94b3cd534c419eb50c6c Mon Sep 17 00:00:00 2001 From: Realcat Date: Sun, 6 Oct 2024 02:40:05 +0800 Subject: [PATCH] update: railway api (#84) --- README.md | 8 ++++++++ server.py => api/server.py | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) rename server.py => api/server.py (99%) diff --git a/README.md b/README.md index 86521bf..302b4a6 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,14 @@ or using [docker](https://hub.docker.com/r/vincentqin/image-matching-webui): docker pull vincentqin/image-matching-webui:latest docker run -it -p 7860:7860 vincentqin/image-matching-webui:latest python app.py --server_name "0.0.0.0" --server_port=7860 ``` + +### Deploy to Railway + +Deploy to [Railway](https://railway.app/), setting up a `Custom Start Command` in `Deploy` section: + +``` bash +python -m api.server +``` ### Run demo ``` bash diff --git a/server.py b/api/server.py similarity index 99% rename from server.py rename to api/server.py index 51080c2..86739fb 100644 --- a/server.py +++ b/api/server.py @@ -13,7 +13,6 @@ from ui.api import ImageMatchingAPI from ui.utils import DEVICE - class ImageInfo(BaseModel): image_path: str max_keypoints: int