Update zero-shot-classification.html
Browse files
zero-shot-classification.html
CHANGED
@@ -7,8 +7,7 @@
|
|
7 |
|
8 |
<script type="module">
|
9 |
// To-Do: transformers.js ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ค pipeline ํจ์๋ฅผ importํ์ญ์์ค.
|
10 |
-
|
11 |
-
|
12 |
// Make it available globally
|
13 |
window.pipeline = pipeline;
|
14 |
</script>
|
@@ -98,9 +97,11 @@
|
|
98 |
// Initialize the sentiment analysis model
|
99 |
async function initializeModel() {
|
100 |
// To-Do: pipeline ํจ์์ task์ model์ ์ง์ ํ์ฌ zero ์ท ๋ถ๋ฅ ๋ชจ๋ธ์ ์์ฑํ์ฌ classifier์ ์ ์ฅํ์ญ์์ค. ๋ชจ๋ธ์ Xenova/mobilebert-uncased-mnli ์ฌ์ฉ
|
101 |
-
|
102 |
-
|
103 |
-
|
|
|
|
|
104 |
|
105 |
}
|
106 |
|
|
|
7 |
|
8 |
<script type="module">
|
9 |
// To-Do: transformers.js ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ค pipeline ํจ์๋ฅผ importํ์ญ์์ค.
|
10 |
+
import { pipeline } from 'https://cdn.jsdelivr.net/npm/@xenova/[email protected]';
|
|
|
11 |
// Make it available globally
|
12 |
window.pipeline = pipeline;
|
13 |
</script>
|
|
|
97 |
// Initialize the sentiment analysis model
|
98 |
async function initializeModel() {
|
99 |
// To-Do: pipeline ํจ์์ task์ model์ ์ง์ ํ์ฌ zero ์ท ๋ถ๋ฅ ๋ชจ๋ธ์ ์์ฑํ์ฌ classifier์ ์ ์ฅํ์ญ์์ค. ๋ชจ๋ธ์ Xenova/mobilebert-uncased-mnli ์ฌ์ฉ
|
100 |
+
// Allocate pipeline
|
101 |
+
classifier = await pipeline('zero-shot-classification', 'Xenova/moclassifierbilebert-uncased-mnli');
|
102 |
+
// To-Do: pipeline ํจ์์ task์ model์ ์ง์ ํ์ฌ zero ์ท ๋ถ๋ฅ ๋ชจ๋ธ์ ์์ฑํ์ฌ ใ
ใ
์ ์ ์ฅํ์ญ์์ค. ๋ชจ๋ธ์ Xenova/nli-deberta-v3-xsmall ์ฌ์ฉ
|
103 |
+
// Allocate pipeline
|
104 |
+
classifierMulti = await pipeline('zero-shot-classification', 'Xenova/nli-deberta-v3-xsmall');
|
105 |
|
106 |
}
|
107 |
|