typefile
{
"image_path": "https://replicate.delivery/pbxt/JpUfLKIPfnYz3Jt8sLBDEPzuSah0Nmy43x1WQgYRCfT90GkZ/latex-test.png"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_5Be**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run mickeybeurskens/latex-ocr using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"mickeybeurskens/latex-ocr:b3278fae4c46eb2798804fc66e721e6ce61a450d072041a7e402b2c77805dcc3",
{
input: {
image_path: "https://replicate.delivery/pbxt/JpUfLKIPfnYz3Jt8sLBDEPzuSah0Nmy43x1WQgYRCfT90GkZ/latex-test.png"
}
}
);
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_5Be**********************************
This is your API token. Keep it to yourself.
import replicate
Run mickeybeurskens/latex-ocr using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"mickeybeurskens/latex-ocr:b3278fae4c46eb2798804fc66e721e6ce61a450d072041a7e402b2c77805dcc3",
input={
"image_path": "https://replicate.delivery/pbxt/JpUfLKIPfnYz3Jt8sLBDEPzuSah0Nmy43x1WQgYRCfT90GkZ/latex-test.png"
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_5Be**********************************
This is your API token. Keep it to yourself.
Run mickeybeurskens/latex-ocr 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": "mickeybeurskens/latex-ocr:b3278fae4c46eb2798804fc66e721e6ce61a450d072041a7e402b2c77805dcc3",
"input": {
"image_path": "https://replicate.delivery/pbxt/JpUfLKIPfnYz3Jt8sLBDEPzuSah0Nmy43x1WQgYRCfT90GkZ/latex-test.png"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
S=\int_{x}\left\{\frac12\sum_{a}\partial^{\mu}\chi_{a}\partial_{\mu}\chi_{a}+V(\rho)\right\},{
"id": "mxpkhirbq77uiinnrgqgmfjhcy",
"model": "mickeybeurskens/latex-ocr",
"version": "b3278fae4c46eb2798804fc66e721e6ce61a450d072041a7e402b2c77805dcc3",
"input": {
"image_path": "https://replicate.delivery/pbxt/JpUfLKIPfnYz3Jt8sLBDEPzuSah0Nmy43x1WQgYRCfT90GkZ/latex-test.png"
},
"logs": "",
"output": "S=\\int_{x}\\left\\{\\frac12\\sum_{a}\\partial^{\\mu}\\chi_{a}\\partial_{\\mu}\\chi_{a}+V(\\rho)\\right\\},",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-11-06T11:52:50.519482Z",
"started_at": "2023-11-06T11:52:50.482896Z",
"completed_at": "2023-11-06T11:52:51.674428Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/mxpkhirbq77uiinnrgqgmfjhcy/cancel",
"get": "https://api.replicate.com/v1/predictions/mxpkhirbq77uiinnrgqgmfjhcy"
},
"metrics": {
"predict_time": 1.191532,
"total_time": 1.154946
}
}