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.
Image to Descripe
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
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 nohamoamary/image-captioning-with-visual-attention using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "nohamoamary/image-captioning-with-visual-attention:9bb60a6baa58801aa7cd4c4fafc95fcf1531bf59b84962aff5a718f4d1f58986", { input: { image: "https://replicate.delivery/pbxt/Ijrm6a7lyXfMLXwPLafBBdOfxnE5VpNeVOlbbDSv8tPsp8Ig/2023-mclaren-artura-101-1655218102.jpg" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
import replicate
output = replicate.run( "nohamoamary/image-captioning-with-visual-attention:9bb60a6baa58801aa7cd4c4fafc95fcf1531bf59b84962aff5a718f4d1f58986", input={ "image": "https://replicate.delivery/pbxt/Ijrm6a7lyXfMLXwPLafBBdOfxnE5VpNeVOlbbDSv8tPsp8Ig/2023-mclaren-artura-101-1655218102.jpg" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "nohamoamary/image-captioning-with-visual-attention:9bb60a6baa58801aa7cd4c4fafc95fcf1531bf59b84962aff5a718f4d1f58986", "input": { "image": "https://replicate.delivery/pbxt/Ijrm6a7lyXfMLXwPLafBBdOfxnE5VpNeVOlbbDSv8tPsp8Ig/2023-mclaren-artura-101-1655218102.jpg" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{ "completed_at": "2023-04-29T23:20:01.249952Z", "created_at": "2023-04-29T23:20:00.606246Z", "data_removed": false, "error": null, "id": "qktgkyherfbjjjwojawxd6cdpq", "input": { "image": "https://replicate.delivery/pbxt/Ijrm6a7lyXfMLXwPLafBBdOfxnE5VpNeVOlbbDSv8tPsp8Ig/2023-mclaren-artura-101-1655218102.jpg" }, "logs": null, "metrics": { "predict_time": 0.529245, "total_time": 0.643706 }, "output": "blue car driving over bend in the background", "started_at": "2023-04-29T23:20:00.720707Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/qktgkyherfbjjjwojawxd6cdpq", "cancel": "https://api.replicate.com/v1/predictions/qktgkyherfbjjjwojawxd6cdpq/cancel" }, "version": "9bb60a6baa58801aa7cd4c4fafc95fcf1531bf59b84962aff5a718f4d1f58986" }
Choose a file from your machine
Hint: you can also drag files onto the input