Update index.html
Browse files- index.html +2 -0
index.html
CHANGED
@@ -111,6 +111,8 @@
|
|
111 |
|
112 |
const result = await response.json();
|
113 |
console.log("Prediction result:", result);
|
|
|
|
|
114 |
|
115 |
} catch (error) {
|
116 |
resultText.innerText = "❌ Error connecting to grammar checker API.";
|
|
|
111 |
|
112 |
const result = await response.json();
|
113 |
console.log("Prediction result:", result);
|
114 |
+
const prediction = data?.data?.[0] || "⚠️ Unexpected API response.";
|
115 |
+
resultText.innerText = prediction;
|
116 |
|
117 |
} catch (error) {
|
118 |
resultText.innerText = "❌ Error connecting to grammar checker API.";
|