andreasjansson / clip-age-predictor
Age prediction using CLIP
Prediction
andreasjansson/clip-age-predictor:a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5IDdvwuuxfnhredvn7jpz6utoftgaStatusSucceededSourceWebHardware–Total duration–CreatedInput
{ "image": "https://replicate.delivery/mgxm/9f51ce52-23f4-4c97-8a79-871f0700f523/Screen_Shot_2021-10-26_at_20.33.37.png" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run andreasjansson/clip-age-predictor using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "andreasjansson/clip-age-predictor:a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5", { input: { image: "https://replicate.delivery/mgxm/9f51ce52-23f4-4c97-8a79-871f0700f523/Screen_Shot_2021-10-26_at_20.33.37.png" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run andreasjansson/clip-age-predictor using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "andreasjansson/clip-age-predictor:a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5", input={ "image": "https://replicate.delivery/mgxm/9f51ce52-23f4-4c97-8a79-871f0700f523/Screen_Shot_2021-10-26_at_20.33.37.png" } ) # The andreasjansson/clip-age-predictor 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/andreasjansson/clip-age-predictor/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run andreasjansson/clip-age-predictor 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": "andreasjansson/clip-age-predictor:a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5", "input": { "image": "https://replicate.delivery/mgxm/9f51ce52-23f4-4c97-8a79-871f0700f523/Screen_Shot_2021-10-26_at_20.33.37.png" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
CLIP thinks you are 69 years old{ "completed_at": "2021-10-27T12:39:46.408499Z", "created_at": "2021-10-27T12:39:44.896803Z", "data_removed": false, "error": null, "id": "dvwuuxfnhredvn7jpz6utoftga", "input": { "image": "https://replicate.delivery/mgxm/9f51ce52-23f4-4c97-8a79-871f0700f523/Screen_Shot_2021-10-26_at_20.33.37.png" }, "logs": "[[0.00541 0.00396 0.003492 0.003334 0.003132 0.00435 0.004627 0.00684\n 0.01093 0.00995 0.00684 0.007057 0.00613 0.006527 0.008125 0.006424\n 0.004417 0.00396 0.003492 0.003605 0.002556 0.002087 0.00222 0.002764\n 0.004627 0.004147 0.00428 0.004925 0.007282 0.00995 0.00995 0.006947\n 0.00964 0.0095 0.011635 0.011635 0.01258 0.011635 0.01566 0.01918\n 0.02208 0.01831 0.02107 0.01775 0.01949 0.01979 0.01692 0.01747\n 0.01802 0.02278 0.01918 0.01775 0.01747 0.01318 0.01541 0.0136\n 0.011635 0.01219 0.01339 0.0201 0.01616 0.0159 0.01471 0.0136\n 0.015175 0.01494 0.0136 0.01566 0.02791 0.0164 0.01238 0.011635\n 0.01093 0.01043 0.01128 0.01076 0.00838 0.009346 0.01027 0.0095\n 0.008514 0.00763 0.007282 0.005943 0.006733 0.00558 0.004776 0.00485\n 0.005005 0.00613 0.006226 0.005245 0.004925 0.00402 0.005005 0.00396\n 0.003605 0.005005 0.007282]]", "metrics": {}, "output": [ { "text": "CLIP thinks you are 69 years old" } ], "started_at": null, "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/dvwuuxfnhredvn7jpz6utoftga", "cancel": "https://api.replicate.com/v1/predictions/dvwuuxfnhredvn7jpz6utoftga/cancel" }, "version": "a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5" }
[[0.00541 0.00396 0.003492 0.003334 0.003132 0.00435 0.004627 0.00684 0.01093 0.00995 0.00684 0.007057 0.00613 0.006527 0.008125 0.006424 0.004417 0.00396 0.003492 0.003605 0.002556 0.002087 0.00222 0.002764 0.004627 0.004147 0.00428 0.004925 0.007282 0.00995 0.00995 0.006947 0.00964 0.0095 0.011635 0.011635 0.01258 0.011635 0.01566 0.01918 0.02208 0.01831 0.02107 0.01775 0.01949 0.01979 0.01692 0.01747 0.01802 0.02278 0.01918 0.01775 0.01747 0.01318 0.01541 0.0136 0.011635 0.01219 0.01339 0.0201 0.01616 0.0159 0.01471 0.0136 0.015175 0.01494 0.0136 0.01566 0.02791 0.0164 0.01238 0.011635 0.01093 0.01043 0.01128 0.01076 0.00838 0.009346 0.01027 0.0095 0.008514 0.00763 0.007282 0.005943 0.006733 0.00558 0.004776 0.00485 0.005005 0.00613 0.006226 0.005245 0.004925 0.00402 0.005005 0.00396 0.003605 0.005005 0.007282]]
Prediction
andreasjansson/clip-age-predictor:a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5IDlbnkmjv7ybhjdpjmmr2dufvk7eStatusSucceededSourceWebHardware–Total duration–CreatedInput
{ "image": "https://replicate.delivery/mgxm/8c578410-9ec6-4b20-a2ee-a625d0c652d8/Screen_Shot_2021-10-27_at_14.38.08.png" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run andreasjansson/clip-age-predictor using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "andreasjansson/clip-age-predictor:a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5", { input: { image: "https://replicate.delivery/mgxm/8c578410-9ec6-4b20-a2ee-a625d0c652d8/Screen_Shot_2021-10-27_at_14.38.08.png" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run andreasjansson/clip-age-predictor using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "andreasjansson/clip-age-predictor:a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5", input={ "image": "https://replicate.delivery/mgxm/8c578410-9ec6-4b20-a2ee-a625d0c652d8/Screen_Shot_2021-10-27_at_14.38.08.png" } ) # The andreasjansson/clip-age-predictor 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/andreasjansson/clip-age-predictor/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run andreasjansson/clip-age-predictor 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": "andreasjansson/clip-age-predictor:a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5", "input": { "image": "https://replicate.delivery/mgxm/8c578410-9ec6-4b20-a2ee-a625d0c652d8/Screen_Shot_2021-10-27_at_14.38.08.png" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
CLIP thinks you are 22 years old{ "completed_at": "2021-10-27T12:38:18.503249Z", "created_at": "2021-10-27T12:38:16.842384Z", "data_removed": false, "error": null, "id": "lbnkmjv7ybhjdpjmmr2dufvk7e", "input": { "image": "https://replicate.delivery/mgxm/8c578410-9ec6-4b20-a2ee-a625d0c652d8/Screen_Shot_2021-10-27_at_14.38.08.png" }, "logs": "[[0.00331 0.003633 0.004314 0.00489 0.00599 0.00452 0.003578 0.002497\n 0.001276 0.00452 0.00331 0.004116 0.004314 0.00489 0.00872 0.01137\n 0.013084 0.01933 0.02296 0.01933 0.02562 0.02643 0.02124 0.02406\n 0.02191 0.0237 0.01996 0.01874 0.01845 0.01003 0.01085 0.01733\n 0.01628 0.01578 0.01155 0.01817 0.01268 0.01192 0.01019 0.00928\n 0.01371 0.014595 0.014595 0.0153 0.01229 0.01604 0.01102 0.01229\n 0.008064 0.00628 0.01051 0.01051 0.01119 0.00988 0.007812 0.008064\n 0.006897 0.007935 0.006477 0.006477 0.01035 0.008446 0.00886 0.00858\n 0.005627 0.007812 0.00658 0.008316 0.005123 0.00734 0.01035 0.01019\n 0.01155 0.01173 0.00679 0.00942 0.008064 0.00942 0.007812 0.005806\n 0.008064 0.008446 0.00928 0.00973 0.006897 0.008995 0.007004 0.00973\n 0.007458 0.00537 0.00618 0.007458 0.007004 0.00628 0.004314 0.004665\n 0.004383 0.003809 0.002659]]", "metrics": {}, "output": [ { "text": "CLIP thinks you are 22 years old" } ], "started_at": null, "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/lbnkmjv7ybhjdpjmmr2dufvk7e", "cancel": "https://api.replicate.com/v1/predictions/lbnkmjv7ybhjdpjmmr2dufvk7e/cancel" }, "version": "a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5" }
[[0.00331 0.003633 0.004314 0.00489 0.00599 0.00452 0.003578 0.002497 0.001276 0.00452 0.00331 0.004116 0.004314 0.00489 0.00872 0.01137 0.013084 0.01933 0.02296 0.01933 0.02562 0.02643 0.02124 0.02406 0.02191 0.0237 0.01996 0.01874 0.01845 0.01003 0.01085 0.01733 0.01628 0.01578 0.01155 0.01817 0.01268 0.01192 0.01019 0.00928 0.01371 0.014595 0.014595 0.0153 0.01229 0.01604 0.01102 0.01229 0.008064 0.00628 0.01051 0.01051 0.01119 0.00988 0.007812 0.008064 0.006897 0.007935 0.006477 0.006477 0.01035 0.008446 0.00886 0.00858 0.005627 0.007812 0.00658 0.008316 0.005123 0.00734 0.01035 0.01019 0.01155 0.01173 0.00679 0.00942 0.008064 0.00942 0.007812 0.005806 0.008064 0.008446 0.00928 0.00973 0.006897 0.008995 0.007004 0.00973 0.007458 0.00537 0.00618 0.007458 0.007004 0.00628 0.004314 0.004665 0.004383 0.003809 0.002659]]
Prediction
andreasjansson/clip-age-predictor:a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5IDsh3uniim6vh57lqkfmjroreofqStatusSucceededSourceWebHardware–Total duration–CreatedInput
{ "image": "https://replicate.delivery/mgxm/c1332bc5-4c7c-4d28-87df-a3a9e57bd827/download_1.jpeg" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run andreasjansson/clip-age-predictor using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "andreasjansson/clip-age-predictor:a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5", { input: { image: "https://replicate.delivery/mgxm/c1332bc5-4c7c-4d28-87df-a3a9e57bd827/download_1.jpeg" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run andreasjansson/clip-age-predictor using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "andreasjansson/clip-age-predictor:a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5", input={ "image": "https://replicate.delivery/mgxm/c1332bc5-4c7c-4d28-87df-a3a9e57bd827/download_1.jpeg" } ) # The andreasjansson/clip-age-predictor 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/andreasjansson/clip-age-predictor/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run andreasjansson/clip-age-predictor 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": "andreasjansson/clip-age-predictor:a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5", "input": { "image": "https://replicate.delivery/mgxm/c1332bc5-4c7c-4d28-87df-a3a9e57bd827/download_1.jpeg" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
CLIP thinks you are 15 years old{ "completed_at": "2021-10-27T12:39:28.449521Z", "created_at": "2021-10-27T12:39:27.012232Z", "data_removed": false, "error": null, "id": "sh3uniim6vh57lqkfmjroreofq", "input": { "image": "https://replicate.delivery/mgxm/c1332bc5-4c7c-4d28-87df-a3a9e57bd827/download_1.jpeg" }, "logs": "[[0.01677 0.01413 0.01306 0.00941 0.00971 0.01018 0.01018 0.00971\n 0.010666 0.01651 0.0173 0.01842 0.01758 0.01457 0.02328 0.0193\n 0.01552 0.01576 0.01993 0.01391 0.00793 0.006992 0.00657 0.007103\n 0.00884 0.00657 0.00598 0.006172 0.007442 0.00912 0.00667 0.006077\n 0.006466 0.006077 0.00831 0.005707 0.006367 0.0058 0.006992 0.00941\n 0.00844 0.00678 0.007328 0.006268 0.01083 0.00657 0.006992 0.00678\n 0.007442 0.01306 0.00956 0.00912 0.00844 0.007103 0.00971 0.007442\n 0.0078 0.007214 0.0078 0.01413 0.00912 0.00884 0.00857 0.00844\n 0.0105 0.006992 0.00831 0.00926 0.00805 0.01504 0.00898 0.00941\n 0.00884 0.00912 0.011894 0.00818 0.00844 0.00956 0.00926 0.01327\n 0.0105 0.0105 0.00941 0.00956 0.01135 0.00941 0.00898 0.00912\n 0.00884 0.01118 0.01118 0.01247 0.011 0.01083 0.012665 0.011\n 0.012276 0.011894 0.01247 ]]", "metrics": {}, "output": [ { "text": "CLIP thinks you are 15 years old" } ], "started_at": null, "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/sh3uniim6vh57lqkfmjroreofq", "cancel": "https://api.replicate.com/v1/predictions/sh3uniim6vh57lqkfmjroreofq/cancel" }, "version": "a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5" }
[[0.01677 0.01413 0.01306 0.00941 0.00971 0.01018 0.01018 0.00971 0.010666 0.01651 0.0173 0.01842 0.01758 0.01457 0.02328 0.0193 0.01552 0.01576 0.01993 0.01391 0.00793 0.006992 0.00657 0.007103 0.00884 0.00657 0.00598 0.006172 0.007442 0.00912 0.00667 0.006077 0.006466 0.006077 0.00831 0.005707 0.006367 0.0058 0.006992 0.00941 0.00844 0.00678 0.007328 0.006268 0.01083 0.00657 0.006992 0.00678 0.007442 0.01306 0.00956 0.00912 0.00844 0.007103 0.00971 0.007442 0.0078 0.007214 0.0078 0.01413 0.00912 0.00884 0.00857 0.00844 0.0105 0.006992 0.00831 0.00926 0.00805 0.01504 0.00898 0.00941 0.00884 0.00912 0.011894 0.00818 0.00844 0.00956 0.00926 0.01327 0.0105 0.0105 0.00941 0.00956 0.01135 0.00941 0.00898 0.00912 0.00884 0.01118 0.01118 0.01247 0.011 0.01083 0.012665 0.011 0.012276 0.011894 0.01247 ]]
Prediction
andreasjansson/clip-age-predictor:a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5ID7fpfiz65brfz3mgcgcwphzgmgiStatusSucceededSourceWebHardware–Total duration–CreatedInput
{ "image": "https://replicate.delivery/mgxm/2a49fdd5-0221-444c-9e09-7becd2c81d6f/ansikte.jpg" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run andreasjansson/clip-age-predictor using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "andreasjansson/clip-age-predictor:a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5", { input: { image: "https://replicate.delivery/mgxm/2a49fdd5-0221-444c-9e09-7becd2c81d6f/ansikte.jpg" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run andreasjansson/clip-age-predictor using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "andreasjansson/clip-age-predictor:a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5", input={ "image": "https://replicate.delivery/mgxm/2a49fdd5-0221-444c-9e09-7becd2c81d6f/ansikte.jpg" } ) # The andreasjansson/clip-age-predictor 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/andreasjansson/clip-age-predictor/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run andreasjansson/clip-age-predictor 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": "andreasjansson/clip-age-predictor:a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5", "input": { "image": "https://replicate.delivery/mgxm/2a49fdd5-0221-444c-9e09-7becd2c81d6f/ansikte.jpg" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
CLIP thinks you are 41 years old{ "completed_at": "2021-10-27T12:37:13.390786Z", "created_at": "2021-10-27T12:37:11.845371Z", "data_removed": false, "error": null, "id": "7fpfiz65brfz3mgcgcwphzgmgi", "input": { "image": "https://replicate.delivery/mgxm/2a49fdd5-0221-444c-9e09-7becd2c81d6f/ansikte.jpg" }, "logs": "[[0.00977 0.005394 0.004074 0.003172 0.003122 0.003708 0.00365\n 0.00548 0.01715 0.00903 0.003075 0.003122 0.00263 0.003172\n 0.004475 0.003376 0.002756 0.002888 0.002934 0.00395 0.002548\n 0.002934 0.003222 0.004837 0.007492 0.00704 0.00773 0.00947\n 0.01561 0.01688 0.01883 0.011604 0.01883 0.01768 0.02101\n 0.02037 0.02419 0.02101 0.03464 0.03632 0.0678 0.03925\n 0.0459 0.03305 0.03986 0.03464 0.02783 0.0238 0.02963\n 0.01825 0.02783 0.01741 0.01768 0.01378 0.010735 0.0109\n 0.00849 0.00849 0.01057 0.0104 0.01216 0.0081 0.00785\n 0.005653 0.00523 0.005745 0.004543 0.004337 0.0104 0.00469\n 0.003538 0.002357 0.002357 0.00208 0.002048 0.001986 0.001522\n 0.001343 0.00162 0.001672 0.001302 0.001046 0.001046 0.0008674\n 0.0009522 0.0008144 0.000615 0.000742 0.0007653 0.0008674 0.000923\n 0.0006056 0.000569 0.0004642 0.00056 0.000479 0.0004227 0.000719\n 0.001498 ]]", "metrics": {}, "output": [ { "text": "CLIP thinks you are 41 years old" } ], "started_at": null, "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/7fpfiz65brfz3mgcgcwphzgmgi", "cancel": "https://api.replicate.com/v1/predictions/7fpfiz65brfz3mgcgcwphzgmgi/cancel" }, "version": "a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5" }
[[0.00977 0.005394 0.004074 0.003172 0.003122 0.003708 0.00365 0.00548 0.01715 0.00903 0.003075 0.003122 0.00263 0.003172 0.004475 0.003376 0.002756 0.002888 0.002934 0.00395 0.002548 0.002934 0.003222 0.004837 0.007492 0.00704 0.00773 0.00947 0.01561 0.01688 0.01883 0.011604 0.01883 0.01768 0.02101 0.02037 0.02419 0.02101 0.03464 0.03632 0.0678 0.03925 0.0459 0.03305 0.03986 0.03464 0.02783 0.0238 0.02963 0.01825 0.02783 0.01741 0.01768 0.01378 0.010735 0.0109 0.00849 0.00849 0.01057 0.0104 0.01216 0.0081 0.00785 0.005653 0.00523 0.005745 0.004543 0.004337 0.0104 0.00469 0.003538 0.002357 0.002357 0.00208 0.002048 0.001986 0.001522 0.001343 0.00162 0.001672 0.001302 0.001046 0.001046 0.0008674 0.0009522 0.0008144 0.000615 0.000742 0.0007653 0.0008674 0.000923 0.0006056 0.000569 0.0004642 0.00056 0.000479 0.0004227 0.000719 0.001498 ]]
Prediction
andreasjansson/clip-age-predictor:a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5ID53cfmxqzfzgona2crcuklgp3gqStatusSucceededSourceWebHardware–Total duration–CreatedInput
{ "image": "https://replicate.delivery/mgxm/fce11033-8cd3-4318-8fed-7eff8afa49a3/Screen_Shot_2021-10-26_at_20.28.10.png" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run andreasjansson/clip-age-predictor using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "andreasjansson/clip-age-predictor:a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5", { input: { image: "https://replicate.delivery/mgxm/fce11033-8cd3-4318-8fed-7eff8afa49a3/Screen_Shot_2021-10-26_at_20.28.10.png" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run andreasjansson/clip-age-predictor using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "andreasjansson/clip-age-predictor:a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5", input={ "image": "https://replicate.delivery/mgxm/fce11033-8cd3-4318-8fed-7eff8afa49a3/Screen_Shot_2021-10-26_at_20.28.10.png" } ) # The andreasjansson/clip-age-predictor 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/andreasjansson/clip-age-predictor/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run andreasjansson/clip-age-predictor 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": "andreasjansson/clip-age-predictor:a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5", "input": { "image": "https://replicate.delivery/mgxm/fce11033-8cd3-4318-8fed-7eff8afa49a3/Screen_Shot_2021-10-26_at_20.28.10.png" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
CLIP thinks you are 97 years old{ "completed_at": "2021-10-27T12:53:27.932286Z", "created_at": "2021-10-27T12:53:26.043416Z", "data_removed": false, "error": null, "id": "53cfmxqzfzgona2crcuklgp3gq", "input": { "image": "https://replicate.delivery/mgxm/fce11033-8cd3-4318-8fed-7eff8afa49a3/Screen_Shot_2021-10-26_at_20.28.10.png" }, "logs": "[[0.004288 0.003725 0.002811 0.002258 0.002026 0.002224 0.002405 0.002901\n 0.003237 0.004494 0.00304 0.00334 0.003237 0.00361 0.004936 0.004562\n 0.004494 0.004288 0.00486 0.006046 0.004154 0.00361 0.003963 0.004494\n 0.00614 0.00568 0.00664 0.00741 0.00936 0.01061 0.00997 0.00718\n 0.00839 0.007645 0.00936 0.00718 0.00981 0.00981 0.012405 0.01406\n 0.01593 0.01384 0.0152 0.012024 0.01862 0.0128 0.01384 0.01341\n 0.0145 0.01593 0.01617 0.01384 0.013 0.01061 0.013 0.010445\n 0.01112 0.01061 0.01165 0.01428 0.01112 0.01184 0.01078 0.010284\n 0.012024 0.0088 0.010284 0.01095 0.00981 0.01593 0.012024 0.012405\n 0.012024 0.01112 0.013 0.009514 0.00997 0.01078 0.01095 0.012024\n 0.01095 0.01112 0.01061 0.00997 0.01112 0.00981 0.012024 0.010124\n 0.01184 0.0126 0.01473 0.01695 0.01723 0.01723 0.02078 0.02014\n 0.02144 0.01805 0.01617 ]]", "metrics": {}, "output": [ { "text": "CLIP thinks you are 97 years old" } ], "started_at": null, "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/53cfmxqzfzgona2crcuklgp3gq", "cancel": "https://api.replicate.com/v1/predictions/53cfmxqzfzgona2crcuklgp3gq/cancel" }, "version": "a73f164f16f88c7586d3227cb276a2d6b611eb3f05f054d299e0a1a53b7d30f5" }
[[0.004288 0.003725 0.002811 0.002258 0.002026 0.002224 0.002405 0.002901 0.003237 0.004494 0.00304 0.00334 0.003237 0.00361 0.004936 0.004562 0.004494 0.004288 0.00486 0.006046 0.004154 0.00361 0.003963 0.004494 0.00614 0.00568 0.00664 0.00741 0.00936 0.01061 0.00997 0.00718 0.00839 0.007645 0.00936 0.00718 0.00981 0.00981 0.012405 0.01406 0.01593 0.01384 0.0152 0.012024 0.01862 0.0128 0.01384 0.01341 0.0145 0.01593 0.01617 0.01384 0.013 0.01061 0.013 0.010445 0.01112 0.01061 0.01165 0.01428 0.01112 0.01184 0.01078 0.010284 0.012024 0.0088 0.010284 0.01095 0.00981 0.01593 0.012024 0.012405 0.012024 0.01112 0.013 0.009514 0.00997 0.01078 0.01095 0.012024 0.01095 0.01112 0.01061 0.00997 0.01112 0.00981 0.012024 0.010124 0.01184 0.0126 0.01473 0.01695 0.01723 0.01723 0.02078 0.02014 0.02144 0.01805 0.01617 ]]
Want to make some of these yourself?
Run this model