wojood-api / static /script.js
alaajabari's picture
Create script.js
1d9f73b verified
raw
history blame contribute delete
474 Bytes
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);
}