typetext
{
"max_tokens": 512,
"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",
"temperature": 0.5,
"top_p": 0.95
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Za5**********************************
This is your API token. Keep it to yourself.
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: {
max_tokens: 512,
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",
temperature: 0.5,
top_p: 0.95
}
}
);
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=r8_Za5**********************************
This is your API token. Keep it to yourself.
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={
"max_tokens": 512,
"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",
"temperature": 0.5,
"top_p": 0.95
}
)
# 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=r8_Za5**********************************
This is your API token. Keep it to yourself.
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": {
"max_tokens": 512,
"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",
"temperature": 0.5,
"top_p": 0.95
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
iPhone 15 Pro Review --------------------- _Reviewed by John Smith on October 5, 2024_ Pros ---- * Improved battery life * Stunning display with 120Hz refresh rate * Powerful A18 chip Cons ---- * High price point * No significant design changes from iPhone 14 Conclusion ---------- 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. Overall Rating: 4.5/5
{
"id": "am3ca28zfsrgc0cjfwaaansnz4",
"model": "justmalhar/reader-lm",
"version": "380e17491e4e4dc4249d059e82554eaba19ec36857f5802c2cbff3ca1b97c3f8",
"input": {
"max_tokens": 512,
"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",
"temperature": 0.5,
"top_p": 0.95
},
"logs": "Total runtime: 1.7519068717956543",
"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",
""
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-10-12T04:54:38.206Z",
"started_at": "2024-10-12T04:54:38.220194Z",
"completed_at": "2024-10-12T04:54:39.982326Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/am3ca28zfsrgc0cjfwaaansnz4/cancel",
"get": "https://api.replicate.com/v1/predictions/am3ca28zfsrgc0cjfwaaansnz4",
"stream": "https://streaming-api.svc.us-central1.g.replicate.net/v1/streams/kgucgio4i5ppflwaw6kkijmyoal5mfwvs4f42s6a7gjeapahb34a",
"web": "https://replicate.com/p/am3ca28zfsrgc0cjfwaaansnz4"
},
"metrics": {
"predict_time": 1.7621318129999999,
"total_time": 1.776326
}
}