Spaces:
Sleeping
Sleeping
File size: 474 Bytes
1d9f73b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | async function runNER() {
const text = document.getElementById("text").value;
const mode = document.getElementById("mode").value;
const response = await fetch("/predict", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({ text, mode })
});
const data = await response.json();
document.getElementById("output").textContent =
JSON.stringify(data, null, 2);
} |