A comprehensive Named Entity Recognition (NER) system.
For successful local web deployment, ensure your machine is equipped with both conda and Docker.
conda create -n deploy python=3.9
creates a conda virtual environmentconda activate deploy
activates the virtual environmentrequirements/web.in
andrequirements/dev.in
specify core Python packages in that environmentmake pip-tools-web-deploy
resolves all other Python dependencies and installs themexport PYTHONPATH="$(pwd):$PYTHONPATH"
makes the current directory visible on your Python path -- add it to your~/.bashrc
andsource ~/.bashrc
git clone https://github.com/hoangvu971/NER-project
cd NER-project
We use
conda
for managing Pythonversions, and for managing Python package dependencies.
We add a Makefile
for making setup dead-simple.
Run conda create -n web-deploy python=3.9
to create an environment called web-deploy
.
conda create -n web-deploy python=3.9
Next, activate the conda environment.
conda activate web-deploy
Next, install all necessary Python packages by running
make pip-tools-web-deploy
The Python script import_and_convert_model.py
imports a Hugging Face model and converts it to the ONNX format, enabling easier deployment and integration with various deep learning frameworks.
python training/import_and_convert_model.py
Navigate to the model_serving
folder
cd model_serving
Build and start a Docker container and maps the container's port 3000 to the host's port 3000
docker-compose up --build
Navigate back to the project's root, then go to app_gradio
folder
cd app_gradio
Start the Gradio app locally
python app.py
Now you can go to the provided local URL in your terminal on your browser to try out the Gradio app.