Spaces:
Sleeping
Sleeping
Update static/script.js
Browse files- static/script.js +1 -1
static/script.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
const textGenForm = document.querySelector('.text-gen-form');
|
| 2 |
|
| 3 |
const translateText = async (text, rating) => {
|
| 4 |
-
const inferResponse = await fetch(`predict
|
| 5 |
const inferJson = await inferResponse.json();
|
| 6 |
|
| 7 |
return inferJson.output;
|
|
|
|
| 1 |
const textGenForm = document.querySelector('.text-gen-form');
|
| 2 |
|
| 3 |
const translateText = async (text, rating) => {
|
| 4 |
+
const inferResponse = await fetch(`predict`, {method: "POST", body: JSON.stringify({"text":text, "rating":rating})});
|
| 5 |
const inferJson = await inferResponse.json();
|
| 6 |
|
| 7 |
return inferJson.output;
|