@@ -17,23 +17,23 @@ export class FeatureExtractor extends Callable {
1717 }
1818
1919 /**
20- * Instantiate one of the processor classes of the library from a pretrained model.
20+ * Instantiate one of the feature extractor classes of the library from a pretrained model.
2121 *
22- * The processor class to instantiate is selected based on the `image_processor_type` (or ` feature_extractor_type`; legacy)
23- * property of the config object (either passed as an argument or loaded from `pretrained_model_name_or_path` if possible)
22+ * The feature extractor class to instantiate is selected based on the `feature_extractor_type` property of
23+ * the config object (either passed as an argument or loaded from `pretrained_model_name_or_path` if possible)
2424 *
2525 * @param {string } pretrained_model_name_or_path The name or path of the pretrained model. Can be either:
26- * - A string, the *model id* of a pretrained processor hosted inside a model repo on huggingface.co.
26+ * - A string, the *model id* of a pretrained feature_extractor hosted inside a model repo on huggingface.co.
2727 * Valid model ids can be located at the root-level, like `bert-base-uncased`, or namespaced under a
2828 * user or organization name, like `dbmdz/bert-base-german-cased`.
29- * - A path to a *directory* containing processor files, e.g., `./my_model_directory/`.
30- * @param {import('../utils/hub.js').PretrainedOptions } options Additional options for loading the processor .
29+ * - A path to a *directory* containing feature_extractor files, e.g., `./my_model_directory/`.
30+ * @param {import('../utils/hub.js').PretrainedOptions } options Additional options for loading the feature_extractor .
3131 *
32- * @returns {Promise<FeatureExtractor> } A new instance of the Processor class.
32+ * @returns {Promise<FeatureExtractor> } A new instance of the Feature Extractor class.
3333 */
3434 static async from_pretrained ( pretrained_model_name_or_path , options ) {
35- const preprocessorConfig = await getModelJSON ( pretrained_model_name_or_path , FEATURE_EXTRACTOR_NAME , true , options ) ;
36- return new this ( preprocessorConfig ) ;
35+ const config = await getModelJSON ( pretrained_model_name_or_path , FEATURE_EXTRACTOR_NAME , true , options ) ;
36+ return new this ( config ) ;
3737 }
3838}
3939
0 commit comments