t5-translator / index.html
boazchung's picture
Update index.html
b206969 verified
raw
history blame
1.12 kB
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>T5-base Language Translator</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="card">
<h1>Welcome to your static Space!</h1>
<h12 color='blue'>huggingface.js 테스트 페이지</h2>
<p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
<p>
Also don't forget to check the
<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
</p>
</div>
<script type="module">
import { HfInference } from 'https://cdn.jsdelivr.net/npm/@huggingface/[email protected]/+esm';
const hf = new HfInference();
// You can also omit "model" to use the recommended model for the task
const result_tr = await hf.translation({
    model: 't5-base',
    inputs: 'My name is Wolfgang and I live in Amsterdam',
});
console.log(result_tr);
</script>
</body>
</html>