lyly21 commited on
Commit
0c6e453
·
verified ·
1 Parent(s): 9fdce57

Update zero-shot-classification.html

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