Categorize text into predefined classes for applications like sentiment analysis, spam detection, and topic classification.

Quickstart

Classify a Text

Send a text to a model to generate a classification label.

import Bytez from "bytez.js";

const client = new Bytez("YOUR_BYTEZ_KEY_HERE");
const model = client.model("AdamCodd/distilbert-base-uncased-finetuned-sentiment-amazon");

const inputText = "We are furious with the results of the experiment!";

const { error, output } = await model.run(inputText);

if (error) {
  console.error("Error:", error);
} else {
  output.forEach(({ label, score }) => {
    console.log({ label, score });
  });
}

Demo