Spaces:
Build error
Build error
Update static/frontend.js
Browse files- static/frontend.js +2 -7
static/frontend.js
CHANGED
@@ -11,13 +11,8 @@
|
|
11 |
async function getResponse(url, user_query){
|
12 |
try {
|
13 |
let predictions = await fetch(url,{
|
14 |
-
method: '
|
15 |
-
body: JSON.stringify({'user_query': user_query})
|
16 |
-
headers: {
|
17 |
-
'Content-type': 'application/json; charset=UTF-8',
|
18 |
-
'Access-Control-Allow-Origin': '*',
|
19 |
-
'Access-Control-Allow-Methods': 'POST, GET',
|
20 |
-
}
|
21 |
});
|
22 |
console.log(predictions)
|
23 |
return predictions.json()
|
|
|
11 |
async function getResponse(url, user_query){
|
12 |
try {
|
13 |
let predictions = await fetch(url,{
|
14 |
+
method: 'GET',
|
15 |
+
body: JSON.stringify({'user_query': user_query})
|
|
|
|
|
|
|
|
|
|
|
16 |
});
|
17 |
console.log(predictions)
|
18 |
return predictions.json()
|