(License: CC BY-SA 4.0)
One stop shop for all AI tasks simplified: https://huggingface.co
Create an account now!
Crowd-sourced resources:
https://huggingface.co/spaces/gradio-tests/english_to_spanish
Click on “Use via API” to get Python code.
Select Javascript.
$ cat index.js
import { client } from "@gradio/client";
const app = await client("https://gradio-tests-english-to-spanish.hf.space/");
const result = await app.predict("/predict", [
"Howdy!", // string in 'text' Textbox component
]);
console.log(result.data);
$ npm i -D @gradio/client
$ node index.js
[ '¡Hola!' ]
See code here: https://github.com/grizzlyhacks/workshop-hugging-face-translate