aztofighi / persian-digit-detector
Persian (Farsi) Handwritten Digit Detector
- Public
- 92 runs
-
CPU
- GitHub
Prediction
aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0eIDx3easkpkqbhjnmv3h3oiqllsqmStatusSucceededSourceWebHardwareCPUTotal durationCreatedInput
{ "image": "https://replicate.delivery/pbxt/Ix2YOFLCHGWq28maJELHDWWhd9Sap7Yac1A8SLOdgTwGVQdz/8sample.png" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run aztofighi/persian-digit-detector using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", { input: { image: "https://replicate.delivery/pbxt/Ix2YOFLCHGWq28maJELHDWWhd9Sap7Yac1A8SLOdgTwGVQdz/8sample.png" } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", 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 aztofighi/persian-digit-detector using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", input={ "image": "https://replicate.delivery/pbxt/Ix2YOFLCHGWq28maJELHDWWhd9Sap7Yac1A8SLOdgTwGVQdz/8sample.png" } ) # To access the file URL: print(output.url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
Run aztofighi/persian-digit-detector 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": "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", "input": { "image": "https://replicate.delivery/pbxt/Ix2YOFLCHGWq28maJELHDWWhd9Sap7Yac1A8SLOdgTwGVQdz/8sample.png" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-06T02:04:11.542028Z", "created_at": "2023-06-06T02:04:11.217316Z", "data_removed": false, "error": null, "id": "x3easkpkqbhjnmv3h3oiqllsqm", "input": { "image": "https://replicate.delivery/pbxt/Ix2YOFLCHGWq28maJELHDWWhd9Sap7Yac1A8SLOdgTwGVQdz/8sample.png" }, "logs": "Predicted label: class_8", "metrics": { "predict_time": 0.34383, "total_time": 0.324712 }, "output": "https://replicate.delivery/pbxt/Lp0mSeS28I0KfUpVvTQgLDG8Tp1jO6j2eyu3ZUlrbIu2wIGiA/out.png", "started_at": "2023-06-06T02:04:11.198198Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/x3easkpkqbhjnmv3h3oiqllsqm", "cancel": "https://api.replicate.com/v1/predictions/x3easkpkqbhjnmv3h3oiqllsqm/cancel" }, "version": "89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e" }
Prediction
aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0eIDm3xbld5t55gnzakbztcilv7b5qStatusSucceededSourceWebHardwareCPUTotal durationCreatedInput
{ "image": "https://replicate.delivery/pbxt/Ix2YlzTEzXMeJdVhwFRi2smXPkjxYDGVHADUzc0bNtNvAkAp/3sample.png" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run aztofighi/persian-digit-detector using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", { input: { image: "https://replicate.delivery/pbxt/Ix2YlzTEzXMeJdVhwFRi2smXPkjxYDGVHADUzc0bNtNvAkAp/3sample.png" } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", 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 aztofighi/persian-digit-detector using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", input={ "image": "https://replicate.delivery/pbxt/Ix2YlzTEzXMeJdVhwFRi2smXPkjxYDGVHADUzc0bNtNvAkAp/3sample.png" } ) # To access the file URL: print(output.url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
Run aztofighi/persian-digit-detector 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": "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", "input": { "image": "https://replicate.delivery/pbxt/Ix2YlzTEzXMeJdVhwFRi2smXPkjxYDGVHADUzc0bNtNvAkAp/3sample.png" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-06T02:04:35.365302Z", "created_at": "2023-06-06T02:04:34.979542Z", "data_removed": false, "error": null, "id": "m3xbld5t55gnzakbztcilv7b5q", "input": { "image": "https://replicate.delivery/pbxt/Ix2YlzTEzXMeJdVhwFRi2smXPkjxYDGVHADUzc0bNtNvAkAp/3sample.png" }, "logs": "Predicted label: class_3", "metrics": { "predict_time": 0.422082, "total_time": 0.38576 }, "output": "https://replicate.delivery/pbxt/n0g893ETjyKHGll9YvS6PCXeHLmg3Uea6PvQ2ywbramzYEDRA/out.png", "started_at": "2023-06-06T02:04:34.943220Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/m3xbld5t55gnzakbztcilv7b5q", "cancel": "https://api.replicate.com/v1/predictions/m3xbld5t55gnzakbztcilv7b5q/cancel" }, "version": "89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e" }
Prediction
aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0eIDbkliwvepn5aifgs535uuelwztyStatusSucceededSourceWebHardwareCPUTotal durationCreatedInput
{ "image": "https://replicate.delivery/pbxt/Ix2Z0uvPHYlZyQAnkcXcnCX2EmGKRpIXKamqlMZgCYeUpOIm/5sample.png" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run aztofighi/persian-digit-detector using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", { input: { image: "https://replicate.delivery/pbxt/Ix2Z0uvPHYlZyQAnkcXcnCX2EmGKRpIXKamqlMZgCYeUpOIm/5sample.png" } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", 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 aztofighi/persian-digit-detector using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", input={ "image": "https://replicate.delivery/pbxt/Ix2Z0uvPHYlZyQAnkcXcnCX2EmGKRpIXKamqlMZgCYeUpOIm/5sample.png" } ) # To access the file URL: print(output.url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
Run aztofighi/persian-digit-detector 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": "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", "input": { "image": "https://replicate.delivery/pbxt/Ix2Z0uvPHYlZyQAnkcXcnCX2EmGKRpIXKamqlMZgCYeUpOIm/5sample.png" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-06T02:04:50.103694Z", "created_at": "2023-06-06T02:04:49.864396Z", "data_removed": false, "error": null, "id": "bkliwvepn5aifgs535uuelwzty", "input": { "image": "https://replicate.delivery/pbxt/Ix2Z0uvPHYlZyQAnkcXcnCX2EmGKRpIXKamqlMZgCYeUpOIm/5sample.png" }, "logs": "Predicted label: class_5", "metrics": { "predict_time": 0.332403, "total_time": 0.239298 }, "output": "https://replicate.delivery/pbxt/EDB09izl1vahMhW0liV5ZpYrMB0qOJ97mG6kLmKmt4aQGxQE/out.png", "started_at": "2023-06-06T02:04:49.771291Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/bkliwvepn5aifgs535uuelwzty", "cancel": "https://api.replicate.com/v1/predictions/bkliwvepn5aifgs535uuelwzty/cancel" }, "version": "89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e" }
Prediction
aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0eID2pm3hrxcmjetri6ctiu4z2ebtaStatusSucceededSourceWebHardwareCPUTotal durationCreatedInput
{ "image": "https://replicate.delivery/pbxt/Ix2ZAJUw69jXbcYIF7EBT5WOKlEYjhH4MwahgvxCV5m9DMP6/2sample.png" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run aztofighi/persian-digit-detector using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", { input: { image: "https://replicate.delivery/pbxt/Ix2ZAJUw69jXbcYIF7EBT5WOKlEYjhH4MwahgvxCV5m9DMP6/2sample.png" } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", 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 aztofighi/persian-digit-detector using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", input={ "image": "https://replicate.delivery/pbxt/Ix2ZAJUw69jXbcYIF7EBT5WOKlEYjhH4MwahgvxCV5m9DMP6/2sample.png" } ) # To access the file URL: print(output.url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
Run aztofighi/persian-digit-detector 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": "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", "input": { "image": "https://replicate.delivery/pbxt/Ix2ZAJUw69jXbcYIF7EBT5WOKlEYjhH4MwahgvxCV5m9DMP6/2sample.png" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-06T02:05:00.141575Z", "created_at": "2023-06-06T02:04:59.767719Z", "data_removed": false, "error": null, "id": "2pm3hrxcmjetri6ctiu4z2ebta", "input": { "image": "https://replicate.delivery/pbxt/Ix2ZAJUw69jXbcYIF7EBT5WOKlEYjhH4MwahgvxCV5m9DMP6/2sample.png" }, "logs": "Predicted label: class_2", "metrics": { "predict_time": 0.397019, "total_time": 0.373856 }, "output": "https://replicate.delivery/pbxt/DxQVhUl3Ie0aLSfgFB3f7b47xcD5iKCbafkCe9I2LvrfSGxQE/out.png", "started_at": "2023-06-06T02:04:59.744556Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/2pm3hrxcmjetri6ctiu4z2ebta", "cancel": "https://api.replicate.com/v1/predictions/2pm3hrxcmjetri6ctiu4z2ebta/cancel" }, "version": "89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e" }
Prediction
aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0eIDwbuipmffwbdshnhvouhtnr4qxiStatusSucceededSourceWebHardwareCPUTotal durationCreatedInput
{ "image": "https://replicate.delivery/pbxt/Ix2ZRmYS4K8HtUClQDi2wAuJ6vmCcC37gsTaFNpVKe3ap8nc/4sample.png" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run aztofighi/persian-digit-detector using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", { input: { image: "https://replicate.delivery/pbxt/Ix2ZRmYS4K8HtUClQDi2wAuJ6vmCcC37gsTaFNpVKe3ap8nc/4sample.png" } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", 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 aztofighi/persian-digit-detector using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", input={ "image": "https://replicate.delivery/pbxt/Ix2ZRmYS4K8HtUClQDi2wAuJ6vmCcC37gsTaFNpVKe3ap8nc/4sample.png" } ) # To access the file URL: print(output.url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
Run aztofighi/persian-digit-detector 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": "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", "input": { "image": "https://replicate.delivery/pbxt/Ix2ZRmYS4K8HtUClQDi2wAuJ6vmCcC37gsTaFNpVKe3ap8nc/4sample.png" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-06T02:05:17.594068Z", "created_at": "2023-06-06T02:05:17.284324Z", "data_removed": false, "error": null, "id": "wbuipmffwbdshnhvouhtnr4qxi", "input": { "image": "https://replicate.delivery/pbxt/Ix2ZRmYS4K8HtUClQDi2wAuJ6vmCcC37gsTaFNpVKe3ap8nc/4sample.png" }, "logs": "Predicted label: class_4", "metrics": { "predict_time": 0.342422, "total_time": 0.309744 }, "output": "https://replicate.delivery/pbxt/aOWUSPCPlf2rUKx3o7TNmXMDCnGdDwFeFdTQcO84ha6dZEDRA/out.png", "started_at": "2023-06-06T02:05:17.251646Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/wbuipmffwbdshnhvouhtnr4qxi", "cancel": "https://api.replicate.com/v1/predictions/wbuipmffwbdshnhvouhtnr4qxi/cancel" }, "version": "89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e" }
Prediction
aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0eIDznqrpyw4cvbvnfwsxzsimg4wfaStatusSucceededSourceWebHardwareCPUTotal durationCreatedInput
{ "image": "https://replicate.delivery/pbxt/Ix2Ze7LQI3gdaNH4dy6SKqitsI2Izif8ZEGwMXGfLjW3knnO/1sample.png" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run aztofighi/persian-digit-detector using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", { input: { image: "https://replicate.delivery/pbxt/Ix2Ze7LQI3gdaNH4dy6SKqitsI2Izif8ZEGwMXGfLjW3knnO/1sample.png" } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", 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 aztofighi/persian-digit-detector using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", input={ "image": "https://replicate.delivery/pbxt/Ix2Ze7LQI3gdaNH4dy6SKqitsI2Izif8ZEGwMXGfLjW3knnO/1sample.png" } ) # To access the file URL: print(output.url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
Run aztofighi/persian-digit-detector 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": "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", "input": { "image": "https://replicate.delivery/pbxt/Ix2Ze7LQI3gdaNH4dy6SKqitsI2Izif8ZEGwMXGfLjW3knnO/1sample.png" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-06T02:05:30.457314Z", "created_at": "2023-06-06T02:05:30.149290Z", "data_removed": false, "error": null, "id": "znqrpyw4cvbvnfwsxzsimg4wfa", "input": { "image": "https://replicate.delivery/pbxt/Ix2Ze7LQI3gdaNH4dy6SKqitsI2Izif8ZEGwMXGfLjW3knnO/1sample.png" }, "logs": "Predicted label: class_1", "metrics": { "predict_time": 0.333821, "total_time": 0.308024 }, "output": "https://replicate.delivery/pbxt/H7q48y4H2eQQTinMfLitERb0CTw7MxnC3X530BrbM5eVzIGiA/out.png", "started_at": "2023-06-06T02:05:30.123493Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/znqrpyw4cvbvnfwsxzsimg4wfa", "cancel": "https://api.replicate.com/v1/predictions/znqrpyw4cvbvnfwsxzsimg4wfa/cancel" }, "version": "89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e" }
Prediction
aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0eIDkzxkylkq3fbl7pzi2uqzhmcw3mStatusSucceededSourceWebHardwareCPUTotal durationCreatedInput
{ "image": "https://replicate.delivery/pbxt/Ix2aT7C8zZ790TCGk7xNG7buEfhzgaMCTAE31neRvPgB1oQQ/9sample.png" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run aztofighi/persian-digit-detector using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", { input: { image: "https://replicate.delivery/pbxt/Ix2aT7C8zZ790TCGk7xNG7buEfhzgaMCTAE31neRvPgB1oQQ/9sample.png" } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", 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 aztofighi/persian-digit-detector using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", input={ "image": "https://replicate.delivery/pbxt/Ix2aT7C8zZ790TCGk7xNG7buEfhzgaMCTAE31neRvPgB1oQQ/9sample.png" } ) # To access the file URL: print(output.url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
Run aztofighi/persian-digit-detector 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": "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", "input": { "image": "https://replicate.delivery/pbxt/Ix2aT7C8zZ790TCGk7xNG7buEfhzgaMCTAE31neRvPgB1oQQ/9sample.png" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-06T02:06:22.410746Z", "created_at": "2023-06-06T02:06:22.067840Z", "data_removed": false, "error": null, "id": "kzxkylkq3fbl7pzi2uqzhmcw3m", "input": { "image": "https://replicate.delivery/pbxt/Ix2aT7C8zZ790TCGk7xNG7buEfhzgaMCTAE31neRvPgB1oQQ/9sample.png" }, "logs": "Predicted label: class_9", "metrics": { "predict_time": 0.392715, "total_time": 0.342906 }, "output": "https://replicate.delivery/pbxt/ZHRekQmleag6epIu6jKXeEVbT4Y6do1PMioB0ngWBWfzTjYIC/out.png", "started_at": "2023-06-06T02:06:22.018031Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/kzxkylkq3fbl7pzi2uqzhmcw3m", "cancel": "https://api.replicate.com/v1/predictions/kzxkylkq3fbl7pzi2uqzhmcw3m/cancel" }, "version": "89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e" }
Prediction
aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0eIDkrzcu7klzvdbjeyl3wo4lg6asiStatusSucceededSourceWebHardwareCPUTotal durationCreatedInput
{ "image": "https://replicate.delivery/pbxt/Ix2aucBxgXNnn7bV8YQqHjBDQ3n8UcFs2pxSvvSohODaGJA9/7sample.png" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run aztofighi/persian-digit-detector using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", { input: { image: "https://replicate.delivery/pbxt/Ix2aucBxgXNnn7bV8YQqHjBDQ3n8UcFs2pxSvvSohODaGJA9/7sample.png" } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", 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 aztofighi/persian-digit-detector using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", input={ "image": "https://replicate.delivery/pbxt/Ix2aucBxgXNnn7bV8YQqHjBDQ3n8UcFs2pxSvvSohODaGJA9/7sample.png" } ) # To access the file URL: print(output.url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
Run aztofighi/persian-digit-detector 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": "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", "input": { "image": "https://replicate.delivery/pbxt/Ix2aucBxgXNnn7bV8YQqHjBDQ3n8UcFs2pxSvvSohODaGJA9/7sample.png" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-06T02:06:49.952135Z", "created_at": "2023-06-06T02:06:49.820371Z", "data_removed": false, "error": null, "id": "krzcu7klzvdbjeyl3wo4lg6asi", "input": { "image": "https://replicate.delivery/pbxt/Ix2aucBxgXNnn7bV8YQqHjBDQ3n8UcFs2pxSvvSohODaGJA9/7sample.png" }, "logs": "Predicted label: class_7", "metrics": { "predict_time": 0.306071, "total_time": 0.131764 }, "output": "https://replicate.delivery/pbxt/XT3xfMZky11BIaKi9ObC2a9splXUZyXq2B97ClWiCjlcNihIA/out.png", "started_at": "2023-06-06T02:06:49.646064Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/krzcu7klzvdbjeyl3wo4lg6asi", "cancel": "https://api.replicate.com/v1/predictions/krzcu7klzvdbjeyl3wo4lg6asi/cancel" }, "version": "89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e" }
Prediction
aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0eIDsncamybbnmgotp7dtj2pwmssyqStatusSucceededSourceWebHardwareCPUTotal durationCreatedInput
{ "image": "https://replicate.delivery/pbxt/J7xQySqTcEC9xqHfOSF4m4zkSCZ5xG5dIhD8YMSkYGjESy98/Screenshot%202023-07-06%20at%204.14.13%20PM.png" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run aztofighi/persian-digit-detector using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", { input: { image: "https://replicate.delivery/pbxt/J7xQySqTcEC9xqHfOSF4m4zkSCZ5xG5dIhD8YMSkYGjESy98/Screenshot%202023-07-06%20at%204.14.13%20PM.png" } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", 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 aztofighi/persian-digit-detector using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", input={ "image": "https://replicate.delivery/pbxt/J7xQySqTcEC9xqHfOSF4m4zkSCZ5xG5dIhD8YMSkYGjESy98/Screenshot%202023-07-06%20at%204.14.13%20PM.png" } ) # To access the file URL: print(output.url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
Run aztofighi/persian-digit-detector 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": "aztofighi/persian-digit-detector:89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e", "input": { "image": "https://replicate.delivery/pbxt/J7xQySqTcEC9xqHfOSF4m4zkSCZ5xG5dIhD8YMSkYGjESy98/Screenshot%202023-07-06%20at%204.14.13%20PM.png" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-07-06T20:14:24.491566Z", "created_at": "2023-07-06T20:14:24.110273Z", "data_removed": false, "error": null, "id": "sncamybbnmgotp7dtj2pwmssyq", "input": { "image": "https://replicate.delivery/pbxt/J7xQySqTcEC9xqHfOSF4m4zkSCZ5xG5dIhD8YMSkYGjESy98/Screenshot%202023-07-06%20at%204.14.13%20PM.png" }, "logs": "Predicted label: class_7", "metrics": { "predict_time": 0.40767, "total_time": 0.381293 }, "output": "https://replicate.delivery/pbxt/mZkN2Xf7RF02JykQQ5AW0L8MRRcQLQXD6JNb8eD06eqAVaaiA/out.png", "started_at": "2023-07-06T20:14:24.083896Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/sncamybbnmgotp7dtj2pwmssyq", "cancel": "https://api.replicate.com/v1/predictions/sncamybbnmgotp7dtj2pwmssyq/cancel" }, "version": "89bde56789c18040e627ce5a528bcd6abc0dba878be7973af061d2b57829bf0e" }
Want to make some of these yourself?
Run this model