GLiNERPredictor
GLiNER predictor
Last updated
GLiNER predictor
Last updated
This predictor is specifically build to use GLiNER approach. See more:
Subclass of Predictor.
Main methods and properties
cfg (GLiNERPredictorConfig, optional): Configuration for predictor. If value equals to None, default GLiNERPredictorConfig configuration will be used. Defaults to None.
input_class (Type[Input], optional): Class for input validation. Defaults to GLiNERPredictorInput.
output_class (Type[Output], optional): Class for output validation. Defaults to GLiNERPredictorOutput.
name (Optional[str], optional): Name for identification. If equals to None, class name will be used. Defaults to None.
Prebuild configuration that describes default parameters for GLiNER models pipeline. Subclass of Config.
model_name (str, optional): Model to use. Defaults to "urchade/gliner_small-v2.1".
device (str): Defaults to "cpu".
Subclass of IOModel.
texts (List[str])
labels (List[str])
threshold (float, optional): Defaults to 0.5.
Subclass of IOModel.
output (List[List[Dict[str, Any]]]): Entities of corresponding inputs.