Spaces:
Runtime error
Runtime error
Commit
·
8a3f25c
1
Parent(s):
37da163
English-Malayalam Translate v35
Browse files- Dockerfile +0 -2
- static/script.js +3 -2
Dockerfile
CHANGED
|
@@ -30,6 +30,4 @@ COPY --chown=user . $HOME/app
|
|
| 30 |
RUN --mount=type=secret,id=API_KEY,mode=0444,required=true \
|
| 31 |
echo "const API_KEY = '$(cat /run/secrets/API_KEY)';" > $HOME/app/static/config.js
|
| 32 |
|
| 33 |
-
RUN cat $HOME/app/static/config.js
|
| 34 |
-
|
| 35 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 30 |
RUN --mount=type=secret,id=API_KEY,mode=0444,required=true \
|
| 31 |
echo "const API_KEY = '$(cat /run/secrets/API_KEY)';" > $HOME/app/static/config.js
|
| 32 |
|
|
|
|
|
|
|
| 33 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
static/script.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
| 1 |
-
|
| 2 |
const translateText = async (text) => {
|
|
|
|
| 3 |
const inferResponse = await fetch(`infer_t5?input=${text}`);
|
| 4 |
const inferJson = await inferResponse.json();
|
| 5 |
-
|
| 6 |
return inferJson.output;
|
| 7 |
};
|
| 8 |
|
|
|
|
| 1 |
+
|
| 2 |
const translateText = async (text) => {
|
| 3 |
+
console.log(text)
|
| 4 |
const inferResponse = await fetch(`infer_t5?input=${text}`);
|
| 5 |
const inferJson = await inferResponse.json();
|
| 6 |
+
console.log(inferJson.output)
|
| 7 |
return inferJson.output;
|
| 8 |
};
|
| 9 |
|