yoadtew / arithmetic
- Public
- 94 runs
-
T4
Prediction
yoadtew/arithmetic:737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218IDkr6e3yimxbd2njuxxcbcrdz2ayStatusSucceededSourceWebHardware–Total durationCreatedInput
{ "image1": "https://replicate.delivery/mgxm/135684b3-b268-476f-b7b5-91079781e1b3/baguette.jpg", "image2": "https://replicate.delivery/mgxm/91259aa2-e2ac-4128-9927-fdf88ce01de0/italy.jpg", "image3": "https://replicate.delivery/mgxm/1bfa90e1-c15a-476d-b3d6-c0c8c522adfe/pizza.jpg", "beam_size": 3, "cond_text": "Image of", "end_factors": 1.06, "ce_loss_scale": 0.25, "max_seq_lengths": "4" }
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 yoadtew/arithmetic using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "yoadtew/arithmetic:737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218", { input: { image1: "https://replicate.delivery/mgxm/135684b3-b268-476f-b7b5-91079781e1b3/baguette.jpg", image2: "https://replicate.delivery/mgxm/91259aa2-e2ac-4128-9927-fdf88ce01de0/italy.jpg", image3: "https://replicate.delivery/mgxm/1bfa90e1-c15a-476d-b3d6-c0c8c522adfe/pizza.jpg", beam_size: 3, cond_text: "Image of", end_factors: 1.06, ce_loss_scale: 0.25, max_seq_lengths: "4" } } ); 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 yoadtew/arithmetic using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "yoadtew/arithmetic:737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218", input={ "image1": "https://replicate.delivery/mgxm/135684b3-b268-476f-b7b5-91079781e1b3/baguette.jpg", "image2": "https://replicate.delivery/mgxm/91259aa2-e2ac-4128-9927-fdf88ce01de0/italy.jpg", "image3": "https://replicate.delivery/mgxm/1bfa90e1-c15a-476d-b3d6-c0c8c522adfe/pizza.jpg", "beam_size": 3, "cond_text": "Image of", "end_factors": 1.06, "ce_loss_scale": 0.25, "max_seq_lengths": "4" } ) # The yoadtew/arithmetic 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/yoadtew/arithmetic/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run yoadtew/arithmetic 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": "yoadtew/arithmetic:737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218", "input": { "image1": "https://replicate.delivery/mgxm/135684b3-b268-476f-b7b5-91079781e1b3/baguette.jpg", "image2": "https://replicate.delivery/mgxm/91259aa2-e2ac-4128-9927-fdf88ce01de0/italy.jpg", "image3": "https://replicate.delivery/mgxm/1bfa90e1-c15a-476d-b3d6-c0c8c522adfe/pizza.jpg", "beam_size": 3, "cond_text": "Image of", "end_factors": 1.06, "ce_loss_scale": 0.25, "max_seq_lengths": "4" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
Best CLIP: Image of France's flag. Best fluency: Image of France's flag. Best mixed: Image of France.{ "completed_at": "2022-02-07T11:45:44.313649Z", "created_at": "2022-02-07T11:45:18.488294Z", "data_removed": false, "error": null, "id": "kr6e3yimxbd2njuxxcbcrdz2ay", "input": { "image1": "https://replicate.delivery/mgxm/135684b3-b268-476f-b7b5-91079781e1b3/baguette.jpg", "image2": "https://replicate.delivery/mgxm/91259aa2-e2ac-4128-9927-fdf88ce01de0/italy.jpg", "image3": "https://replicate.delivery/mgxm/1bfa90e1-c15a-476d-b3d6-c0c8c522adfe/pizza.jpg", "beam_size": 3, "cond_text": "Image of", "end_factors": 1.06, "ce_loss_scale": 0.25, "max_seq_lengths": "4" }, "logs": "07/02/2022 11:45:21 | [' France %% -0.9429325', ' Italy %% -1.9058607', ' French %% -3.0901644']\n07/02/2022 11:45:28 | [' France. %% -1.634866', ' Italy. %% -1.7019478', \" France's %% -2.7457068\"]\n07/02/2022 11:45:36 | [' France.! %% -1.634866', ' Italy.! %% -1.7019478', \" France's flag %% -3.6017933\"]\n07/02/2022 11:45:43 | [' France.!! %% -1.634866', ' Italy.!! %% -1.7019478', \" France's flag. %% -3.1221015\"]", "metrics": { "predict_time": 25.629286, "total_time": 25.825355 }, "output": [ { "text": "Best CLIP: Image of France's flag. \nBest fluency: Image of France's flag. \nBest mixed: Image of France." } ], "started_at": "2022-02-07T11:45:18.684363Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/kr6e3yimxbd2njuxxcbcrdz2ay", "cancel": "https://api.replicate.com/v1/predictions/kr6e3yimxbd2njuxxcbcrdz2ay/cancel" }, "version": "737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218" }
Generated in07/02/2022 11:45:21 | [' France %% -0.9429325', ' Italy %% -1.9058607', ' French %% -3.0901644'] 07/02/2022 11:45:28 | [' France. %% -1.634866', ' Italy. %% -1.7019478', " France's %% -2.7457068"] 07/02/2022 11:45:36 | [' France.! %% -1.634866', ' Italy.! %% -1.7019478', " France's flag %% -3.6017933"] 07/02/2022 11:45:43 | [' France.!! %% -1.634866', ' Italy.!! %% -1.7019478', " France's flag. %% -3.1221015"]
Prediction
yoadtew/arithmetic:737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218IDjhxohu544vfxhhyquxqyq67shyStatusSucceededSourceWebHardware–Total durationCreatedInput
{ "image1": "https://replicate.delivery/mgxm/86dd6e37-464d-42dc-8a1b-ce977662dfc2/cow.jpg", "image2": "https://replicate.delivery/mgxm/6c75d5d0-568f-44fc-8611-85f851a31b49/egg2.jpg", "image3": "https://replicate.delivery/mgxm/11adcef9-aa5a-4372-848c-f41477c804b9/chicken.jpg", "beam_size": 3, "cond_text": "Image of", "end_factors": 1.06, "ce_loss_scale": 0.25, "max_seq_lengths": "4" }
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 yoadtew/arithmetic using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "yoadtew/arithmetic:737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218", { input: { image1: "https://replicate.delivery/mgxm/86dd6e37-464d-42dc-8a1b-ce977662dfc2/cow.jpg", image2: "https://replicate.delivery/mgxm/6c75d5d0-568f-44fc-8611-85f851a31b49/egg2.jpg", image3: "https://replicate.delivery/mgxm/11adcef9-aa5a-4372-848c-f41477c804b9/chicken.jpg", beam_size: 3, cond_text: "Image of", end_factors: 1.06, ce_loss_scale: 0.25, max_seq_lengths: "4" } } ); 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 yoadtew/arithmetic using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "yoadtew/arithmetic:737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218", input={ "image1": "https://replicate.delivery/mgxm/86dd6e37-464d-42dc-8a1b-ce977662dfc2/cow.jpg", "image2": "https://replicate.delivery/mgxm/6c75d5d0-568f-44fc-8611-85f851a31b49/egg2.jpg", "image3": "https://replicate.delivery/mgxm/11adcef9-aa5a-4372-848c-f41477c804b9/chicken.jpg", "beam_size": 3, "cond_text": "Image of", "end_factors": 1.06, "ce_loss_scale": 0.25, "max_seq_lengths": "4" } ) # The yoadtew/arithmetic 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/yoadtew/arithmetic/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run yoadtew/arithmetic 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": "yoadtew/arithmetic:737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218", "input": { "image1": "https://replicate.delivery/mgxm/86dd6e37-464d-42dc-8a1b-ce977662dfc2/cow.jpg", "image2": "https://replicate.delivery/mgxm/6c75d5d0-568f-44fc-8611-85f851a31b49/egg2.jpg", "image3": "https://replicate.delivery/mgxm/11adcef9-aa5a-4372-848c-f41477c804b9/chicken.jpg", "beam_size": 3, "cond_text": "Image of", "end_factors": 1.06, "ce_loss_scale": 0.25, "max_seq_lengths": "4" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
Best CLIP: Image of milk. Best fluency: Image of chicken fat. Best mixed: Image of milk.{ "completed_at": "2022-02-07T11:47:29.339765Z", "created_at": "2022-02-07T11:47:10.888495Z", "data_removed": false, "error": null, "id": "jhxohu544vfxhhyquxqyq67shy", "input": { "image1": "https://replicate.delivery/mgxm/86dd6e37-464d-42dc-8a1b-ce977662dfc2/cow.jpg", "image2": "https://replicate.delivery/mgxm/6c75d5d0-568f-44fc-8611-85f851a31b49/egg2.jpg", "image3": "https://replicate.delivery/mgxm/11adcef9-aa5a-4372-848c-f41477c804b9/chicken.jpg", "beam_size": 3, "cond_text": "Image of", "end_factors": 1.06, "ce_loss_scale": 0.25, "max_seq_lengths": "4" }, "logs": "07/02/2022 11:47:14 | [' milk %% -3.607249', ' the %% -4.146947', ' chicken %% -4.744006']\n07/02/2022 11:47:21 | [' milk. %% -2.757174', ' chicken fat %% -3.834673', ' chicken. %% -3.9611936']\n07/02/2022 11:47:28 | [' milk.! %% -2.757174', ' chicken fat. %% -3.1038754', ' chicken.! %% -3.9611936']", "metrics": { "predict_time": 18.243715, "total_time": 18.45127 }, "output": [ { "text": "Best CLIP: Image of milk. \nBest fluency: Image of chicken fat. \nBest mixed: Image of milk." } ], "started_at": "2022-02-07T11:47:11.096050Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/jhxohu544vfxhhyquxqyq67shy", "cancel": "https://api.replicate.com/v1/predictions/jhxohu544vfxhhyquxqyq67shy/cancel" }, "version": "737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218" }
Generated in07/02/2022 11:47:14 | [' milk %% -3.607249', ' the %% -4.146947', ' chicken %% -4.744006'] 07/02/2022 11:47:21 | [' milk. %% -2.757174', ' chicken fat %% -3.834673', ' chicken. %% -3.9611936'] 07/02/2022 11:47:28 | [' milk.! %% -2.757174', ' chicken fat. %% -3.1038754', ' chicken.! %% -3.9611936']
Prediction
yoadtew/arithmetic:737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218IDj5g4qing2jaindriw26klxql4yStatusSucceededSourceWebHardware–Total durationCreatedInput
{ "image1": "https://replicate.delivery/mgxm/ae9ba19a-3ef0-4724-b6c5-715a0be39692/eiffle.jpg", "image2": "https://replicate.delivery/mgxm/9e0c882e-3c1a-40b6-b231-d032a10b5ebd/usa.jpg", "image3": "https://replicate.delivery/mgxm/2c259b12-8940-4502-8206-9af24e663ee2/capitol.jpg", "beam_size": "5", "cond_text": "Image of", "end_factors": 1.06, "ce_loss_scale": 0.2, "max_seq_lengths": "4" }
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 yoadtew/arithmetic using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "yoadtew/arithmetic:737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218", { input: { image1: "https://replicate.delivery/mgxm/ae9ba19a-3ef0-4724-b6c5-715a0be39692/eiffle.jpg", image2: "https://replicate.delivery/mgxm/9e0c882e-3c1a-40b6-b231-d032a10b5ebd/usa.jpg", image3: "https://replicate.delivery/mgxm/2c259b12-8940-4502-8206-9af24e663ee2/capitol.jpg", beam_size: "5", cond_text: "Image of", end_factors: 1.06, ce_loss_scale: 0.2, max_seq_lengths: "4" } } ); 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 yoadtew/arithmetic using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "yoadtew/arithmetic:737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218", input={ "image1": "https://replicate.delivery/mgxm/ae9ba19a-3ef0-4724-b6c5-715a0be39692/eiffle.jpg", "image2": "https://replicate.delivery/mgxm/9e0c882e-3c1a-40b6-b231-d032a10b5ebd/usa.jpg", "image3": "https://replicate.delivery/mgxm/2c259b12-8940-4502-8206-9af24e663ee2/capitol.jpg", "beam_size": "5", "cond_text": "Image of", "end_factors": 1.06, "ce_loss_scale": 0.2, "max_seq_lengths": "4" } ) # The yoadtew/arithmetic 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/yoadtew/arithmetic/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run yoadtew/arithmetic 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": "yoadtew/arithmetic:737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218", "input": { "image1": "https://replicate.delivery/mgxm/ae9ba19a-3ef0-4724-b6c5-715a0be39692/eiffle.jpg", "image2": "https://replicate.delivery/mgxm/9e0c882e-3c1a-40b6-b231-d032a10b5ebd/usa.jpg", "image3": "https://replicate.delivery/mgxm/2c259b12-8940-4502-8206-9af24e663ee2/capitol.jpg", "beam_size": "5", "cond_text": "Image of", "end_factors": 1.06, "ce_loss_scale": 0.2, "max_seq_lengths": "4" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
Best CLIP: Image of France. Best fluency: Image of the world. Best mixed: Image of France.{ "completed_at": "2022-02-07T20:41:17.468320Z", "created_at": "2022-02-07T20:40:50.511373Z", "data_removed": false, "error": null, "id": "j5g4qing2jaindriw26klxql4y", "input": { "image1": "https://replicate.delivery/mgxm/ae9ba19a-3ef0-4724-b6c5-715a0be39692/eiffle.jpg", "image2": "https://replicate.delivery/mgxm/9e0c882e-3c1a-40b6-b231-d032a10b5ebd/usa.jpg", "image3": "https://replicate.delivery/mgxm/2c259b12-8940-4502-8206-9af24e663ee2/capitol.jpg", "beam_size": "5", "cond_text": "Image of", "end_factors": 1.06, "ce_loss_scale": 0.2, "max_seq_lengths": "4" }, "logs": "07/02/2022 20:40:53 | [' French %% -1.5718586', ' the %% -1.7321693', ' France %% -2.646708', ' World %% -3.665781', ' world %% -4.00222']\n07/02/2022 20:41:05 | [' France. %% -2.2273226', ' French. %% -2.5530052', ' the world %% -2.7489004', ' world. %% -2.9033055', ' the French %% -2.97674']\n07/02/2022 20:41:16 | [' France.! %% -2.2273226', ' the world. %% -2.4138563', ' French.! %% -2.5530052', ' world.! %% -2.9033055', ' the French. %% -2.954996']", "metrics": { "predict_time": 26.750693, "total_time": 26.956947 }, "output": [ { "text": "Best CLIP: Image of France. \nBest fluency: Image of the world. \nBest mixed: Image of France." } ], "started_at": "2022-02-07T20:40:50.717627Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/j5g4qing2jaindriw26klxql4y", "cancel": "https://api.replicate.com/v1/predictions/j5g4qing2jaindriw26klxql4y/cancel" }, "version": "737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218" }
Generated in07/02/2022 20:40:53 | [' French %% -1.5718586', ' the %% -1.7321693', ' France %% -2.646708', ' World %% -3.665781', ' world %% -4.00222'] 07/02/2022 20:41:05 | [' France. %% -2.2273226', ' French. %% -2.5530052', ' the world %% -2.7489004', ' world. %% -2.9033055', ' the French %% -2.97674'] 07/02/2022 20:41:16 | [' France.! %% -2.2273226', ' the world. %% -2.4138563', ' French.! %% -2.5530052', ' world.! %% -2.9033055', ' the French. %% -2.954996']
Prediction
yoadtew/arithmetic:737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218IDn6cpgvuwyzgcrnpii6523fhqumStatusSucceededSourceWebHardware–Total durationCreatedInput
{ "image1": "https://replicate.delivery/mgxm/2fa6c68f-a992-429a-80a8-29dc735c481e/kremlin.jpg", "image2": "https://replicate.delivery/mgxm/9eec82ca-4be4-4676-98ac-7aae2bfdada9/usa.jpg", "image3": "https://replicate.delivery/mgxm/10251a76-31ac-4c6e-a946-0dbb4e67ef3b/capitol.jpg", "beam_size": "5", "cond_text": "Image of", "end_factors": 1.06, "ce_loss_scale": 0.2, "max_seq_lengths": "4" }
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 yoadtew/arithmetic using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "yoadtew/arithmetic:737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218", { input: { image1: "https://replicate.delivery/mgxm/2fa6c68f-a992-429a-80a8-29dc735c481e/kremlin.jpg", image2: "https://replicate.delivery/mgxm/9eec82ca-4be4-4676-98ac-7aae2bfdada9/usa.jpg", image3: "https://replicate.delivery/mgxm/10251a76-31ac-4c6e-a946-0dbb4e67ef3b/capitol.jpg", beam_size: "5", cond_text: "Image of", end_factors: 1.06, ce_loss_scale: 0.2, max_seq_lengths: "4" } } ); 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 yoadtew/arithmetic using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "yoadtew/arithmetic:737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218", input={ "image1": "https://replicate.delivery/mgxm/2fa6c68f-a992-429a-80a8-29dc735c481e/kremlin.jpg", "image2": "https://replicate.delivery/mgxm/9eec82ca-4be4-4676-98ac-7aae2bfdada9/usa.jpg", "image3": "https://replicate.delivery/mgxm/10251a76-31ac-4c6e-a946-0dbb4e67ef3b/capitol.jpg", "beam_size": "5", "cond_text": "Image of", "end_factors": 1.06, "ce_loss_scale": 0.2, "max_seq_lengths": "4" } ) # The yoadtew/arithmetic 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/yoadtew/arithmetic/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run yoadtew/arithmetic 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": "yoadtew/arithmetic:737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218", "input": { "image1": "https://replicate.delivery/mgxm/2fa6c68f-a992-429a-80a8-29dc735c481e/kremlin.jpg", "image2": "https://replicate.delivery/mgxm/9eec82ca-4be4-4676-98ac-7aae2bfdada9/usa.jpg", "image3": "https://replicate.delivery/mgxm/10251a76-31ac-4c6e-a946-0dbb4e67ef3b/capitol.jpg", "beam_size": "5", "cond_text": "Image of", "end_factors": 1.06, "ce_loss_scale": 0.2, "max_seq_lengths": "4" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
Best CLIP: Image of Russia Russia is a Best fluency: Image of Russia Russia is the Best mixed: Image of Russia Russia.{ "completed_at": "2022-02-07T20:42:14.498934Z", "created_at": "2022-02-07T20:41:35.480470Z", "data_removed": false, "error": null, "id": "n6cpgvuwyzgcrnpii6523fhqum", "input": { "image1": "https://replicate.delivery/mgxm/2fa6c68f-a992-429a-80a8-29dc735c481e/kremlin.jpg", "image2": "https://replicate.delivery/mgxm/9eec82ca-4be4-4676-98ac-7aae2bfdada9/usa.jpg", "image3": "https://replicate.delivery/mgxm/10251a76-31ac-4c6e-a946-0dbb4e67ef3b/capitol.jpg", "beam_size": "5", "cond_text": "Image of", "end_factors": 1.06, "ce_loss_scale": 0.2, "max_seq_lengths": "4" }, "logs": "07/02/2022 20:41:38 | [' Russia %% -2.124317', ' Russian %% -2.4558306', ' the %% -3.5170617', ' Russians %% -4.037196', ' US %% -4.1297226']\n07/02/2022 20:41:50 | [' Russia Russia %% -2.1668415', ' Russian. %% -2.404074', ' the Russian %% -3.0759494', ' Russians. %% -3.7069006', ' Russia Russian %% -3.7998052']\n07/02/2022 20:42:02 | [' Russia Russia. %% -2.2597458', ' Russian.! %% -2.404074', \" Russia Russia's %% -3.2141354\", ' Russia Russia has %% -3.3322175', ' Russia Russia is %% -3.3513412']\n07/02/2022 20:42:13 | [' Russia Russia.! %% -2.2597458', ' Russian.!! %% -2.404074', ' Russia Russia is the %% -3.6605666', ' Russia Russia is a %% -3.7493534', ' Russia Russia is. %% -3.7535248']", "metrics": { "predict_time": 38.830666, "total_time": 39.018464 }, "output": [ { "text": "Best CLIP: Image of Russia Russia is a \nBest fluency: Image of Russia Russia is the \nBest mixed: Image of Russia Russia." } ], "started_at": "2022-02-07T20:41:35.668268Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/n6cpgvuwyzgcrnpii6523fhqum", "cancel": "https://api.replicate.com/v1/predictions/n6cpgvuwyzgcrnpii6523fhqum/cancel" }, "version": "737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218" }
Generated in07/02/2022 20:41:38 | [' Russia %% -2.124317', ' Russian %% -2.4558306', ' the %% -3.5170617', ' Russians %% -4.037196', ' US %% -4.1297226'] 07/02/2022 20:41:50 | [' Russia Russia %% -2.1668415', ' Russian. %% -2.404074', ' the Russian %% -3.0759494', ' Russians. %% -3.7069006', ' Russia Russian %% -3.7998052'] 07/02/2022 20:42:02 | [' Russia Russia. %% -2.2597458', ' Russian.! %% -2.404074', " Russia Russia's %% -3.2141354", ' Russia Russia has %% -3.3322175', ' Russia Russia is %% -3.3513412'] 07/02/2022 20:42:13 | [' Russia Russia.! %% -2.2597458', ' Russian.!! %% -2.404074', ' Russia Russia is the %% -3.6605666', ' Russia Russia is a %% -3.7493534', ' Russia Russia is. %% -3.7535248']
Prediction
yoadtew/arithmetic:737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218IDlaibiaimzjhi5i7lmn65upoh4iStatusSucceededSourceWebHardware–Total durationCreatedInput
{ "image1": "https://replicate.delivery/mgxm/df567013-7696-4a58-89ae-e72fcd539929/pyramid.jpg", "image2": "https://replicate.delivery/mgxm/9e0c882e-3c1a-40b6-b231-d032a10b5ebd/usa.jpg", "image3": "https://replicate.delivery/mgxm/2c259b12-8940-4502-8206-9af24e663ee2/capitol.jpg", "beam_size": "5", "cond_text": "Image of", "end_factors": 1.06, "ce_loss_scale": 0.2, "max_seq_lengths": "4" }
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 yoadtew/arithmetic using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "yoadtew/arithmetic:737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218", { input: { image1: "https://replicate.delivery/mgxm/df567013-7696-4a58-89ae-e72fcd539929/pyramid.jpg", image2: "https://replicate.delivery/mgxm/9e0c882e-3c1a-40b6-b231-d032a10b5ebd/usa.jpg", image3: "https://replicate.delivery/mgxm/2c259b12-8940-4502-8206-9af24e663ee2/capitol.jpg", beam_size: "5", cond_text: "Image of", end_factors: 1.06, ce_loss_scale: 0.2, max_seq_lengths: "4" } } ); 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 yoadtew/arithmetic using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "yoadtew/arithmetic:737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218", input={ "image1": "https://replicate.delivery/mgxm/df567013-7696-4a58-89ae-e72fcd539929/pyramid.jpg", "image2": "https://replicate.delivery/mgxm/9e0c882e-3c1a-40b6-b231-d032a10b5ebd/usa.jpg", "image3": "https://replicate.delivery/mgxm/2c259b12-8940-4502-8206-9af24e663ee2/capitol.jpg", "beam_size": "5", "cond_text": "Image of", "end_factors": 1.06, "ce_loss_scale": 0.2, "max_seq_lengths": "4" } ) # The yoadtew/arithmetic 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/yoadtew/arithmetic/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run yoadtew/arithmetic 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": "yoadtew/arithmetic:737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218", "input": { "image1": "https://replicate.delivery/mgxm/df567013-7696-4a58-89ae-e72fcd539929/pyramid.jpg", "image2": "https://replicate.delivery/mgxm/9e0c882e-3c1a-40b6-b231-d032a10b5ebd/usa.jpg", "image3": "https://replicate.delivery/mgxm/2c259b12-8940-4502-8206-9af24e663ee2/capitol.jpg", "beam_size": "5", "cond_text": "Image of", "end_factors": 1.06, "ce_loss_scale": 0.2, "max_seq_lengths": "4" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
Best CLIP: Image of Egypt. Best fluency: Image of U. Best mixed: Image of U.{ "completed_at": "2022-02-07T20:43:43.331515Z", "created_at": "2022-02-07T20:43:16.112280Z", "data_removed": false, "error": null, "id": "laibiaimzjhi5i7lmn65upoh4i", "input": { "image1": "https://replicate.delivery/mgxm/df567013-7696-4a58-89ae-e72fcd539929/pyramid.jpg", "image2": "https://replicate.delivery/mgxm/9e0c882e-3c1a-40b6-b231-d032a10b5ebd/usa.jpg", "image3": "https://replicate.delivery/mgxm/2c259b12-8940-4502-8206-9af24e663ee2/capitol.jpg", "beam_size": "5", "cond_text": "Image of", "end_factors": 1.06, "ce_loss_scale": 0.2, "max_seq_lengths": "4" }, "logs": "07/02/2022 20:43:19 | [' the %% -3.7102294', ' Egyptian %% -3.7111435', ' US %% -3.716634', ' U %% -4.0127826', ' Egypt %% -4.1653075']\n07/02/2022 20:43:31 | [' U. %% -2.9583662', ' Egypt. %% -3.1702278', ' US. %% -3.7043114', ' the US %% -4.009556', ' Egyptian. %% -4.1966124']\n07/02/2022 20:43:42 | [' U.! %% -2.9583662', ' Egypt.! %% -3.1702278', ' the US. %% -3.350386', ' US.! %% -3.7043114', ' Egyptian.! %% -4.1966124']", "metrics": { "predict_time": 26.970863, "total_time": 27.219235 }, "output": [ { "text": "Best CLIP: Image of Egypt. \nBest fluency: Image of U. \nBest mixed: Image of U." } ], "started_at": "2022-02-07T20:43:16.360652Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/laibiaimzjhi5i7lmn65upoh4i", "cancel": "https://api.replicate.com/v1/predictions/laibiaimzjhi5i7lmn65upoh4i/cancel" }, "version": "737d4915f4d8303b5f38cd3ecbbc310bda34b76044473de002f1e23494d86218" }
Generated in07/02/2022 20:43:19 | [' the %% -3.7102294', ' Egyptian %% -3.7111435', ' US %% -3.716634', ' U %% -4.0127826', ' Egypt %% -4.1653075'] 07/02/2022 20:43:31 | [' U. %% -2.9583662', ' Egypt. %% -3.1702278', ' US. %% -3.7043114', ' the US %% -4.009556', ' Egyptian. %% -4.1966124'] 07/02/2022 20:43:42 | [' U.! %% -2.9583662', ' Egypt.! %% -3.1702278', ' the US. %% -3.350386', ' US.! %% -3.7043114', ' Egyptian.! %% -4.1966124']
Want to make some of these yourself?
Run this model