suinY00N commited on
Commit
e2abe30
·
verified ·
1 Parent(s): e903e02

Update zero-shot-classification.html

Browse files
Files changed (1) hide show
  1. zero-shot-classification.html +3 -1
zero-shot-classification.html CHANGED
@@ -7,7 +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;
@@ -97,6 +97,8 @@
97
 
98
  // Initialize the sentiment analysis model
99
  async function initializeModel() {
 
 
100
  // To-Do: pipeline 함수에 task와 model을 지정하여 zero 샷 분류 모델을 생성하여 classifier에 저장하십시오. 모델은 Xenova/mobilebert-uncased-mnli 사용
101
 
102
  // To-Do: pipeline 함수에 task와 model을 지정하여 zero 샷 분류 모델을 생성하여 classifierMulti에 저장하십시오. 모델은 Xenova/nli-deberta-v3-xsmall 사용
 
7
 
8
  <script type="module">
9
  // To-Do: transformers.js 라이브러리 중 pipeline 함수를 import하십시오.
10
+ import { pipeline } from 'https://cdn.jsdelivr.net/npm/@xenova/transformers@2.5.4';
11
 
12
  // Make it available globally
13
  window.pipeline = pipeline;
 
97
 
98
  // Initialize the sentiment analysis model
99
  async function initializeModel() {
100
+ classifier = await pipeline('zero-shot-classification', 'Xenova/mobilebert-uncased-mnli');
101
+ classifierMulti = await pipeline('zero-shot-classification', 'Xenova/nli-deberta-v3-xsmall');
102
  // To-Do: pipeline 함수에 task와 model을 지정하여 zero 샷 분류 모델을 생성하여 classifier에 저장하십시오. 모델은 Xenova/mobilebert-uncased-mnli 사용
103
 
104
  // To-Do: pipeline 함수에 task와 model을 지정하여 zero 샷 분류 모델을 생성하여 classifierMulti에 저장하십시오. 모델은 Xenova/nli-deberta-v3-xsmall 사용