ilar06 commited on
Commit
34a8319
·
verified ·
1 Parent(s): 71849a9

Update zero-shot-classification.html

Browse files
Files changed (1) hide show
  1. zero-shot-classification.html +3 -4
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,9 @@
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 사용
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
+ let classifier = await pipeline ('zero-shot-classification','Xenova/mobilebert-uncased-mnli');
101
  // To-Do: pipeline 함수에 task와 model을 지정하여 zero 샷 분류 모델을 생성하여 classifierMulti에 저장하십시오. 모델은 Xenova/nli-deberta-v3-xsmall 사용
102
+ let classifierMulti = await pipeline ('zero-shot-classification', 'Xenova/nli-deberta-v3-xsmall');
103
 
104
  }
105