Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
justmalhar /reader-lm:380e1749
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run justmalhar/reader-lm using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"justmalhar/reader-lm:380e17491e4e4dc4249d059e82554eaba19ec36857f5802c2cbff3ca1b97c3f8",
{
input: {
top_p: 0.95,
prompt: "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Best Chocolate Chip Cookies Recipe</title>\n</head>\n<body>\n <header>\n <h1>Best Ever Chocolate Chip Cookies</h1>\n <p>Prep Time: 15 mins | Cook Time: 10 mins | Servings: 24</p>\n </header>\n\n <section>\n <h2>Ingredients</h2>\n <ul>\n <li>2 1/4 cups all-purpose flour</li>\n <li>1 teaspoon baking soda</li>\n <li>1/2 teaspoon salt</li>\n <li>1 cup unsalted butter, melted</li>\n <li>1 1/2 cups packed brown sugar</li>\n <li>2 large eggs</li>\n <li>2 teaspoons vanilla extract</li>\n <li>2 cups semisweet chocolate chips</li>\n </ul>\n </section>\n\n <section>\n <h2>Instructions</h2>\n <ol>\n <li>Preheat oven to 350°F (175°C).</li>\n <li>In a bowl, whisk together flour, baking soda, and salt.</li>\n <li>In a separate bowl, beat melted butter and brown sugar until fluffy.</li>\n <li>Add eggs and vanilla, mix well.</li>\n <li>Gradually add dry ingredients to the wet ingredients.</li>\n <li>Stir in chocolate chips.</li>\n <li>Drop spoonfuls of dough onto a baking sheet.</li>\n <li>Bake for 10-12 minutes until edges are golden brown.</li>\n </ol>\n </section>\n\n <footer>\n <p>Enjoy your delicious homemade chocolate chip cookies!</p>\n </footer>\n</body>\n</html>\n",
max_tokens: 512,
temperature: 0.5
}
}
);
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run justmalhar/reader-lm using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"justmalhar/reader-lm:380e17491e4e4dc4249d059e82554eaba19ec36857f5802c2cbff3ca1b97c3f8",
input={
"top_p": 0.95,
"prompt": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Best Chocolate Chip Cookies Recipe</title>\n</head>\n<body>\n <header>\n <h1>Best Ever Chocolate Chip Cookies</h1>\n <p>Prep Time: 15 mins | Cook Time: 10 mins | Servings: 24</p>\n </header>\n\n <section>\n <h2>Ingredients</h2>\n <ul>\n <li>2 1/4 cups all-purpose flour</li>\n <li>1 teaspoon baking soda</li>\n <li>1/2 teaspoon salt</li>\n <li>1 cup unsalted butter, melted</li>\n <li>1 1/2 cups packed brown sugar</li>\n <li>2 large eggs</li>\n <li>2 teaspoons vanilla extract</li>\n <li>2 cups semisweet chocolate chips</li>\n </ul>\n </section>\n\n <section>\n <h2>Instructions</h2>\n <ol>\n <li>Preheat oven to 350°F (175°C).</li>\n <li>In a bowl, whisk together flour, baking soda, and salt.</li>\n <li>In a separate bowl, beat melted butter and brown sugar until fluffy.</li>\n <li>Add eggs and vanilla, mix well.</li>\n <li>Gradually add dry ingredients to the wet ingredients.</li>\n <li>Stir in chocolate chips.</li>\n <li>Drop spoonfuls of dough onto a baking sheet.</li>\n <li>Bake for 10-12 minutes until edges are golden brown.</li>\n </ol>\n </section>\n\n <footer>\n <p>Enjoy your delicious homemade chocolate chip cookies!</p>\n </footer>\n</body>\n</html>\n",
"max_tokens": 512,
"temperature": 0.5
}
)
# The justmalhar/reader-lm model can stream output as it's running.
# The predict method returns an iterator, and you can iterate over that output.
for item in output:
# https://replicate.com/justmalhar/reader-lm/api#output-schema
print(item, end="")
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run justmalhar/reader-lm using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "justmalhar/reader-lm:380e17491e4e4dc4249d059e82554eaba19ec36857f5802c2cbff3ca1b97c3f8",
"input": {
"top_p": 0.95,
"prompt": "<!DOCTYPE html>\\n<html lang=\\"en\\">\\n<head>\\n <meta charset=\\"UTF-8\\">\\n <meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\">\\n <title>Best Chocolate Chip Cookies Recipe</title>\\n</head>\\n<body>\\n <header>\\n <h1>Best Ever Chocolate Chip Cookies</h1>\\n <p>Prep Time: 15 mins | Cook Time: 10 mins | Servings: 24</p>\\n </header>\\n\\n <section>\\n <h2>Ingredients</h2>\\n <ul>\\n <li>2 1/4 cups all-purpose flour</li>\\n <li>1 teaspoon baking soda</li>\\n <li>1/2 teaspoon salt</li>\\n <li>1 cup unsalted butter, melted</li>\\n <li>1 1/2 cups packed brown sugar</li>\\n <li>2 large eggs</li>\\n <li>2 teaspoons vanilla extract</li>\\n <li>2 cups semisweet chocolate chips</li>\\n </ul>\\n </section>\\n\\n <section>\\n <h2>Instructions</h2>\\n <ol>\\n <li>Preheat oven to 350°F (175°C).</li>\\n <li>In a bowl, whisk together flour, baking soda, and salt.</li>\\n <li>In a separate bowl, beat melted butter and brown sugar until fluffy.</li>\\n <li>Add eggs and vanilla, mix well.</li>\\n <li>Gradually add dry ingredients to the wet ingredients.</li>\\n <li>Stir in chocolate chips.</li>\\n <li>Drop spoonfuls of dough onto a baking sheet.</li>\\n <li>Bake for 10-12 minutes until edges are golden brown.</li>\\n </ol>\\n </section>\\n\\n <footer>\\n <p>Enjoy your delicious homemade chocolate chip cookies!</p>\\n </footer>\\n</body>\\n</html>\\n",
"max_tokens": 512,
"temperature": 0.5
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2024-10-12T04:52:51.177012Z",
"created_at": "2024-10-12T04:51:16.104000Z",
"data_removed": false,
"error": null,
"id": "dsx217ra11rga0cjfw8sccksx8",
"input": {
"top_p": 0.95,
"prompt": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Best Chocolate Chip Cookies Recipe</title>\n</head>\n<body>\n <header>\n <h1>Best Ever Chocolate Chip Cookies</h1>\n <p>Prep Time: 15 mins | Cook Time: 10 mins | Servings: 24</p>\n </header>\n\n <section>\n <h2>Ingredients</h2>\n <ul>\n <li>2 1/4 cups all-purpose flour</li>\n <li>1 teaspoon baking soda</li>\n <li>1/2 teaspoon salt</li>\n <li>1 cup unsalted butter, melted</li>\n <li>1 1/2 cups packed brown sugar</li>\n <li>2 large eggs</li>\n <li>2 teaspoons vanilla extract</li>\n <li>2 cups semisweet chocolate chips</li>\n </ul>\n </section>\n\n <section>\n <h2>Instructions</h2>\n <ol>\n <li>Preheat oven to 350°F (175°C).</li>\n <li>In a bowl, whisk together flour, baking soda, and salt.</li>\n <li>In a separate bowl, beat melted butter and brown sugar until fluffy.</li>\n <li>Add eggs and vanilla, mix well.</li>\n <li>Gradually add dry ingredients to the wet ingredients.</li>\n <li>Stir in chocolate chips.</li>\n <li>Drop spoonfuls of dough onto a baking sheet.</li>\n <li>Bake for 10-12 minutes until edges are golden brown.</li>\n </ol>\n </section>\n\n <footer>\n <p>Enjoy your delicious homemade chocolate chip cookies!</p>\n </footer>\n</body>\n</html>\n",
"max_tokens": 512,
"temperature": 0.5
},
"logs": "Total runtime: 2.6575536727905273",
"metrics": {
"predict_time": 2.664000117,
"total_time": 95.073012
},
"output": [
"Pre",
"p",
" Time",
":",
" ",
"1",
"5",
" mins",
" |",
" Cook",
" Time",
":",
" ",
"1",
"0",
" mins",
" |",
" Serv",
"ings",
":",
" ",
"2",
"4",
"\n\n",
"Ingredients",
"\n",
"-----------\n\n",
"*",
" ",
" ",
"2",
" ",
"1",
"/",
"4",
" cups",
" all",
"-purpose",
" flour",
"\n",
"*",
" ",
" ",
"1",
" teaspoon",
" baking",
" soda",
"\n",
"*",
" ",
" ",
"1",
"/",
"2",
" teaspoon",
" salt",
"\n",
"*",
" ",
" ",
"1",
" cup",
" uns",
"alted",
" butter",
",",
" melted",
"\n",
"*",
" ",
" ",
"1",
" ",
"1",
"/",
"2",
" cups",
" packed",
" brown",
" sugar",
"\n",
"*",
" ",
" ",
"2",
" large",
" eggs",
"\n",
"*",
" ",
" ",
"2",
" teaspoons",
" vanilla",
" extract",
"\n",
"*",
" ",
" ",
"2",
" cups",
" sem",
"is",
"weet",
" chocolate",
" chips",
"\n\n",
"Instructions",
"\n",
"------------",
"\n\n",
"1",
".",
" ",
" Pre",
"heat",
" oven",
" to",
" ",
"3",
"5",
"0",
"°F",
" (",
"1",
"7",
"5",
"°C",
").\n",
"2",
".",
" ",
" In",
" a",
" bowl",
",",
" whisk",
" together",
" flour",
",",
" baking",
" soda",
",",
" and",
" salt",
".\n",
"3",
".",
" ",
" In",
" a",
" separate",
" bowl",
",",
" beat",
" melted",
" butter",
" and",
" brown",
" sugar",
" until",
" fluffy",
".\n",
"4",
".",
" ",
" Add",
" eggs",
" and",
" vanilla",
",",
" mix",
" well",
".\n",
"5",
".",
" ",
" Grad",
"ually",
" add",
" dry",
" ingredients",
" to",
" the",
" wet",
" ingredients",
".\n",
"6",
".",
" ",
" Stir",
" in",
" chocolate",
" chips",
".\n",
"7",
".",
" ",
" Drop",
" spoon",
"ful",
"s",
" of",
" dough",
" onto",
" a",
" baking",
" sheet",
".\n",
"8",
".",
" ",
" Bake",
" for",
" ",
"1",
"0",
"-",
"1",
"2",
" minutes",
" until",
" edges",
" are",
" golden",
" brown",
".\n\n",
"Enjoy",
" your",
" delicious",
" homemade",
" chocolate",
" chip",
" cookies",
"!",
""
],
"started_at": "2024-10-12T04:52:48.513012Z",
"status": "succeeded",
"urls": {
"stream": "https://streaming-api.svc.us-central1.g.replicate.net/v1/streams/ranbwixjwxa3ugwzs7qzubjvupkzudae4y3ecsmlpil6gp3kafnq",
"get": "https://api.replicate.com/v1/predictions/dsx217ra11rga0cjfw8sccksx8",
"cancel": "https://api.replicate.com/v1/predictions/dsx217ra11rga0cjfw8sccksx8/cancel"
},
"version": "380e17491e4e4dc4249d059e82554eaba19ec36857f5802c2cbff3ca1b97c3f8"
}
Total runtime: 2.6575536727905273