diff --git a/javascript/README.md b/javascript/README.md index 832ee63..9e0f6ec 100644 --- a/javascript/README.md +++ b/javascript/README.md @@ -20,16 +20,14 @@ yarn add uform ```js import { getModel, Modality, TextProcessor, TextEncoder, ImageEncoder, ImageProcessor } from '@unum-cloud/uform'; -const { configPath, modalityPaths, tokenizerPath } = await getModel({ +const { configPath, modalityPaths, tokenizerPath } = await getModel( modelId: 'unum-cloud/uform3-image-text-english-small', - modalities: [Modality.TextEncoder, Modality.ImageEncoder], - token: null, // Optional Hugging Face token for private models - saveDir: null, // Optional directory to save the model to -}); + modalities: [Modality.TextEncoder, Modality.ImageEncoder] +); const textProcessor = new TextProcessor(configPath, tokenizerPath); await textProcessor.init(); -const processedTexts = await textProcessor.process("a small red panda in a zoo"); +const processedTexts = await textProcessor.process(["a small red panda in a zoo"]); const textEncoder = new TextEncoder(modalityPaths.text_encoder, textProcessor); await textEncoder.init(); diff --git a/package.json b/package.json index 2659f9d..3e4c83c 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "files": [ "javascript/index.mjs", "javascript/encoders.mjs", - "javascript/hub.js" + "javascript/hub.mjs" ], "directories": { "doc": "docs" @@ -34,4 +34,4 @@ ], "author": "Ash Vardanian, Unum Cloud", "license": "Apache-2.0" -} \ No newline at end of file +}