Spaces:
Build error
Build error
Update static/frontend.js
Browse files- static/frontend.js +7 -4
static/frontend.js
CHANGED
@@ -10,10 +10,13 @@
|
|
10 |
|
11 |
async function getResponse(url, user_query){
|
12 |
try {
|
13 |
-
let predictions = await fetch(url,{
|
14 |
-
|
15 |
-
|
16 |
-
});
|
|
|
|
|
|
|
17 |
console.log(predictions)
|
18 |
return predictions.json()
|
19 |
} catch (error) {
|
|
|
10 |
|
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 |
+
let final_url = url + '?input=' + user_query
|
18 |
+
console.log(final_url)
|
19 |
+
let predictions = await fetch(final_url);
|
20 |
console.log(predictions)
|
21 |
return predictions.json()
|
22 |
} catch (error) {
|