aexol-studio / newsletter_samarite

Recommendation System for samarite (newsletter)

  • Public
  • 77 runs
  • CPU
Iterate in playground

Input

Run this model in Node.js with one line of code:

npx create-replicate --model=aexol-studio/newsletter_samarite
or set up a project from scratch
npm install replicate
Set the REPLICATE_API_TOKEN environment variable:
export REPLICATE_API_TOKEN=<paste-your-token-here>

Find your API token in your account settings.

Import and set up the client:
import Replicate from "replicate";

const replicate = new Replicate({
  auth: process.env.REPLICATE_API_TOKEN,
});

Run aexol-studio/newsletter_samarite using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.

const output = await replicate.run(
  "aexol-studio/newsletter_samarite:c7b936da00683fd25cd798c83ab34371ced69f71566a863701aa786e93afe123",
  {
    input: {
      product: "GRAND DIVINE CREAM",
      predict_type: "rfm-score",
      show_metrics: false,
      num_last_orders: 0
    }
  }
);

console.log(output);

To learn more, take a look at the guide on getting started with Node.js.

Output

No output yet! Press "Submit" to start a prediction.

Run time and cost

This model runs on CPU hardware. We don't yet have enough runs of this model to provide performance information.

Readme

Recommendations: 1. Don’t use both num_last_orders and start_date/end_date parameters at the same time. If you use num_last_orders parameter, leave start_date and end_date empty. Otherwise, if you use start_date and end_date parameters, leave num_last_orders with 0. 2. Make sure the date is in the correct format (ISO 8601). 3. Provided num_last_orders parameter must be between 10000 and, 200000. 4. Minimum time range is 1 week. 5. If product parameter is set to ALL, the model will predict for all products. 6. If product are not in the dataset or only in a small amount of orders, the model will return an error. 7. If you want to enter a custom product name, set product to CUSTOM and enter your product name in the custom_product parameter. 8. Provided more orders or longer time range will result in better predictions.