From 7e35884949a3b57f6b1517b154a9a773f7b31edc Mon Sep 17 00:00:00 2001 From: Wonjin Yoon <13089179+wonjininfo@users.noreply.github.com> Date: Sat, 13 Jul 2024 02:30:18 -0400 Subject: [PATCH] Update kazu_webservice.rst Get the version of Kazu in a dynamic manner, Add correct term (Swagger UI), Test env --- docs/kazu_webservice.rst | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/docs/kazu_webservice.rst b/docs/kazu_webservice.rst index 7296e96e..8fc968a6 100644 --- a/docs/kazu_webservice.rst +++ b/docs/kazu_webservice.rst @@ -17,8 +17,12 @@ Install the library with the `webserver` option: .. code-block:: bash - export VERSION=2.1.1 - pip install kazu[webserver]==${VERSION} + pip install 'kazu[webserver]' + + # Get the version of Kazu in a dynamic manner + # Alternatively, you can set the version string manually, + # for example: export VERSION=2.1.1 + export VERSION=$(python -c "from importlib.metadata import version; print(version('kazu'))") wget https://github.com/AstraZeneca/KAZU/releases/download/v${VERSION}/kazu_model_pack_public-v${VERSION}.zip unzip kazu_model_pack_public-v${VERSION}.zip @@ -61,16 +65,33 @@ To test, execute the following example from any machine on the same network as t --data '{"text": "EGFR is an important gene in breast cancer study."}' \ http://${IP_ADDR}:${PORT}/api/kazu -FastAPI +Demo Front Page +--------------- + +(New feature) - in development stage (PR #57) + +You can see the demo frontend page at: + +`http://:/` + +You can find an example from here: http://kazu.korea.ac.kr/ + + +Swagger UI (by FastAPI) ------- -You can see the FastAPI documentation at : +You can see the FastAPI documentation (Swagger UI) at : -http://:/docs +`http://:/api/docs` -One successful example is http://kazu.korea.ac.kr/docs. +One example is http://kazu.korea.ac.kr/api/docs Note ---- -We tested this tutorial with python 3.9.6, Kazu 2.1.1, on a CPU-only linux server. + +We tested this tutorial with: + +1. Python 3.9.6, Kazu 2.1.1, on a CPU-only Linux server. +2. Python 3.11, Kazu 2.1.1+, on a CPU-only macOS (Intel MacBook). +