UNPKG

@huggingface/tasks

Version:
36 lines (35 loc) 1.08 kB
{ "$id": "/inference/schemas/text-classification/input.json", "$schema": "http://json-schema.org/draft-06/schema#", "description": "Inputs for Text Classification inference", "title": "TextClassificationInput", "type": "object", "properties": { "inputs": { "description": "The text to classify", "type": "string" }, "parameters": { "description": "Additional inference parameters for Text Classification", "$ref": "#/$defs/TextClassificationParameters" } }, "$defs": { "TextClassificationParameters": { "title": "TextClassificationParameters", "type": "object", "properties": { "function_to_apply": { "title": "TextClassificationOutputTransform", "$ref": "/inference/schemas/common-definitions.json#/definitions/ClassificationOutputTransform", "description": "The function to apply to the model outputs in order to retrieve the scores." }, "top_k": { "type": "integer", "description": "When specified, limits the output to the top K most probable classes." } } } }, "required": ["inputs"] }