gaur3009 commited on
Commit
5b634c5
·
verified ·
1 Parent(s): 32497e7

Update index.html

Browse files
Files changed (1) hide show
  1. 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/run/predict", {
104
- method: "POST",
105
- headers: { "Content-Type": "application/json" },
106
- body: JSON.stringify({
107
- data: [null, inputText], // match input order: [audio, text]
108
- fn_index: 2 // this is crucial!
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