Spaces:
Sleeping
Sleeping
| 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); | |
| } |