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>iPhone 15 Pro Review - TechReview</title>\n</head>\n<body>\n <header>\n <h1>iPhone 15 Pro Review</h1>\n <p><em>Reviewed by John Smith on October 5, 2024</em></p>\n </header>\n\n <section>\n <h2>Pros</h2>\n <ul>\n <li>Improved battery life</li>\n <li>Stunning display with 120Hz refresh rate</li>\n <li>Powerful A18 chip</li>\n </ul>\n </section>\n\n <section>\n <h2>Cons</h2>\n <ul>\n <li>High price point</li>\n <li>No significant design changes from iPhone 14</li>\n </ul>\n </section>\n\n <section>\n <h2>Conclusion</h2>\n <p>The iPhone 15 Pro is an excellent upgrade for those looking for improved performance and battery life. However, its high price and minimal design changes might make some users hesitate.</p>\n </section>\n\n <footer>\n <p>Overall Rating: 4.5/5</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>iPhone 15 Pro Review - TechReview</title>\n</head>\n<body>\n <header>\n <h1>iPhone 15 Pro Review</h1>\n <p><em>Reviewed by John Smith on October 5, 2024</em></p>\n </header>\n\n <section>\n <h2>Pros</h2>\n <ul>\n <li>Improved battery life</li>\n <li>Stunning display with 120Hz refresh rate</li>\n <li>Powerful A18 chip</li>\n </ul>\n </section>\n\n <section>\n <h2>Cons</h2>\n <ul>\n <li>High price point</li>\n <li>No significant design changes from iPhone 14</li>\n </ul>\n </section>\n\n <section>\n <h2>Conclusion</h2>\n <p>The iPhone 15 Pro is an excellent upgrade for those looking for improved performance and battery life. However, its high price and minimal design changes might make some users hesitate.</p>\n </section>\n\n <footer>\n <p>Overall Rating: 4.5/5</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>iPhone 15 Pro Review - TechReview</title>\\n</head>\\n<body>\\n <header>\\n <h1>iPhone 15 Pro Review</h1>\\n <p><em>Reviewed by John Smith on October 5, 2024</em></p>\\n </header>\\n\\n <section>\\n <h2>Pros</h2>\\n <ul>\\n <li>Improved battery life</li>\\n <li>Stunning display with 120Hz refresh rate</li>\\n <li>Powerful A18 chip</li>\\n </ul>\\n </section>\\n\\n <section>\\n <h2>Cons</h2>\\n <ul>\\n <li>High price point</li>\\n <li>No significant design changes from iPhone 14</li>\\n </ul>\\n </section>\\n\\n <section>\\n <h2>Conclusion</h2>\\n <p>The iPhone 15 Pro is an excellent upgrade for those looking for improved performance and battery life. However, its high price and minimal design changes might make some users hesitate.</p>\\n </section>\\n\\n <footer>\\n <p>Overall Rating: 4.5/5</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:54:39.982326Z",
"created_at": "2024-10-12T04:54:38.206000Z",
"data_removed": false,
"error": null,
"id": "am3ca28zfsrgc0cjfwaaansnz4",
"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>iPhone 15 Pro Review - TechReview</title>\n</head>\n<body>\n <header>\n <h1>iPhone 15 Pro Review</h1>\n <p><em>Reviewed by John Smith on October 5, 2024</em></p>\n </header>\n\n <section>\n <h2>Pros</h2>\n <ul>\n <li>Improved battery life</li>\n <li>Stunning display with 120Hz refresh rate</li>\n <li>Powerful A18 chip</li>\n </ul>\n </section>\n\n <section>\n <h2>Cons</h2>\n <ul>\n <li>High price point</li>\n <li>No significant design changes from iPhone 14</li>\n </ul>\n </section>\n\n <section>\n <h2>Conclusion</h2>\n <p>The iPhone 15 Pro is an excellent upgrade for those looking for improved performance and battery life. However, its high price and minimal design changes might make some users hesitate.</p>\n </section>\n\n <footer>\n <p>Overall Rating: 4.5/5</p>\n </footer>\n</body>\n</html>\n",
"max_tokens": 512,
"temperature": 0.5
},
"logs": "Total runtime: 1.7519068717956543",
"metrics": {
"predict_time": 1.7621318129999999,
"total_time": 1.776326
},
"output": [
"iPhone",
" ",
"1",
"5",
" Pro",
" Review",
"\n",
"----------------",
"-----\n\n",
"_",
"Reviewed",
" by",
" John",
" Smith",
" on",
" October",
" ",
"5",
",",
" ",
"2",
"0",
"2",
"4",
"_\n\n",
"Pros",
"\n",
"----\n\n",
"*",
" ",
" Improved",
" battery",
" life",
"\n",
"*",
" ",
" Stunning",
" display",
" with",
" ",
"1",
"2",
"0",
"Hz",
" refresh",
" rate",
"\n",
"*",
" ",
" Powerful",
" A",
"1",
"8",
" chip",
"\n\n",
"Cons",
"\n",
"----\n\n",
"*",
" ",
" High",
" price",
" point",
"\n",
"*",
" ",
" No",
" significant",
" design",
" changes",
" from",
" iPhone",
" ",
"1",
"4",
"\n\n",
"Conclusion",
"\n",
"----------\n\n",
"The",
" iPhone",
" ",
"1",
"5",
" Pro",
" is",
" an",
" excellent",
" upgrade",
" for",
" those",
" looking",
" for",
" improved",
" performance",
" and",
" battery",
" life",
".",
" However",
",",
" its",
" high",
" price",
" and",
" minimal",
" design",
" changes",
" might",
" make",
" some",
" users",
" hesitate",
".\n\n",
"Overall",
" Rating",
":",
" ",
"4",
".",
"5",
"/",
"5",
""
],
"started_at": "2024-10-12T04:54:38.220194Z",
"status": "succeeded",
"urls": {
"stream": "https://streaming-api.svc.us-central1.g.replicate.net/v1/streams/kgucgio4i5ppflwaw6kkijmyoal5mfwvs4f42s6a7gjeapahb34a",
"get": "https://api.replicate.com/v1/predictions/am3ca28zfsrgc0cjfwaaansnz4",
"cancel": "https://api.replicate.com/v1/predictions/am3ca28zfsrgc0cjfwaaansnz4/cancel"
},
"version": "380e17491e4e4dc4249d059e82554eaba19ec36857f5802c2cbff3ca1b97c3f8"
}
Total runtime: 1.7519068717956543