MCPcopy Create free account
hub / github.com/tensorflow/tfjs-examples / init

Method init

sentiment/index.js:39–44  ·  view source on GitHub ↗

* Initializes the Sentiment demo.

(urls)

Source from the content-addressed store, hash-verified

37 * Initializes the Sentiment demo.
38 */
39 async init(urls) {
40 this.urls = urls;
41 this.model = await loader.loadHostedPretrainedModel(urls.model);
42 await this.loadMetadata();
43 return this;
44 }
45
46 async loadMetadata() {
47 const sentimentMetadata =

Callers 1

setupSentimentFunction · 0.45

Calls 1

loadMetadataMethod · 0.95

Tested by

no test coverage detected