Skip to content

Commit

Permalink
Update kazu_webservice.rst
Browse files Browse the repository at this point in the history
Get the version of Kazu in a dynamic manner, 
Add correct term (Swagger UI), 
Test env
  • Loading branch information
wonjininfo authored Jul 13, 2024
1 parent 3a9c6f1 commit 4ad19ee
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions docs/kazu_webservice.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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://<your-ip-address>:<port>/`

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://<your-ip-address>:<port>/docs
`http://<your-ip-address>:<port>/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).

0 comments on commit 4ad19ee

Please sign in to comment.