Update index.html
Browse files- index.html +7 -11
index.html
CHANGED
@@ -100,17 +100,13 @@
|
|
100 |
resultBox.style.display = "block";
|
101 |
|
102 |
try {
|
103 |
-
const response = await fetch("https://gaur3009-speech-grammar.hf.space/
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
});
|
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 |
|
|
|
100 |
resultBox.style.display = "block";
|
101 |
|
102 |
try {
|
103 |
+
const response = await fetch("https://gaur3009-speech-grammar.hf.space/predict", {
|
104 |
+
method: "POST",
|
105 |
+
headers: { "Content-Type": "application/json" },
|
106 |
+
body: JSON.stringify({
|
107 |
+
data: [null, inputText]
|
108 |
+
})
|
109 |
+
});
|
|
|
|
|
|
|
|
|
110 |
const prediction = data?.data?.[0] || "⚠️ Unexpected API response.";
|
111 |
resultText.innerText = prediction;
|
112 |
|