oceankim commited on
Commit
928b7cd
โ€ข
1 Parent(s): c9bd8ba

Update zero-shot-classification.html

Browse files
Files changed (1) hide show
  1. zero-shot-classification.html +6 -5
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
- // 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
+ // 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