Installation
To begin using the GLiClass model, you can install the GLiClass Python library through pip, conda, or directly from the source.
Install via Pip
pip install gliclass
Install from Source
To install the GLiClass library from source, follow these steps:
-
Clone the Repository:
First, clone the GLiClass repository from GitHub:
git clone https://github.com/Knowledgator/GLiClass -
Navigate to the Project Directory:
Change to the directory containing the cloned repository:
cd GLiClass -
Install Dependencies:
tipIt's a good practice to create and activate a virtual environment before installing dependencies:
python -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate -
Install the GLiNER Package:
Finally, install the GLiClass package using:
pip install -U .tipUse
pip install -U -e .to install in editable mode -
Verify Installation:
You can verify the installation by importing the library in a Python script:
import gliclass
print(gliclass.__version__)