# CURL request to train GRPO model with image support
curl -X POST http://your-api-endpoint.com/your-route \
-H "Content-Type: application/json" \
-d '{
"data": [
{
"question": "what is the brand of phone?",
"answer": "nokia",
"image": "/home/jovyan/shares/SR004.nfs2/data/textvqa/train_images/0054c91397f2fe05.jpg",
"width": 512,
"height": 365,
"bboxs": [[168, 168, 193, 178]],
"dataset": "textvqa",
"split": "train"
},
{
"question": "what type of plane is this?",
"answer": "lape",
"image": "/home/jovyan/shares/SR004.nfs2/data/textvqa/train_images/005635e119b9f32f.jpg",
"width": 512,
"height": 333,
"bboxs": [[265, 154, 304, 167]],
"dataset": "textvqa",
"split": "train"
}
]
}'
const formData = new FormData();
formData.append("datasetname", "set1");
// Add image files
const fileInput = document.querySelector("#fileInput");
for (const file of fileInput.files) {
formData.append("files", file);
}
const response = await fetch(endpoint, {
method: "POST",
headers: {
"x-api-key": apiKey,
"Content-Type": "application/json"
},
body: formData
});
string
Enter a description