Setosm commited on
Commit
24a2c02
·
verified ·
1 Parent(s): 24e6e6a

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +3 -6
index.js CHANGED
@@ -5,16 +5,13 @@ const status = document.getElementById('status');
5
  const inputText = document.getElementById('text-field');
6
  const inputSubmitBtn = document.getElementById('submit');
7
 
8
- const pipelineConfig = ('token-classification', 'Setosm/bert-finetuned-for-medical-ner');
9
-
10
  // Create a new object detection pipeline
11
- status.textContent = 'Loading model...';
12
- const detector = await pipeline(pipelineConfig);
13
- status.textContent = 'Ready';
14
 
15
  inputSubmitBtn.addEventListener('click', async (e) => {
16
  e.preventDefault();
17
- let classifier = await pipeline('token-classification');
18
  let result = await classifier(inputText.value);
19
  console.log(result);
20
  showOutput();
 
5
  const inputText = document.getElementById('text-field');
6
  const inputSubmitBtn = document.getElementById('submit');
7
 
 
 
8
  // Create a new object detection pipeline
9
+ // status.textContent = 'Loading model...';
10
+ const classifier = await pipeline('token-classification', 'Setosm/bert-finetuned-for-medical-ner');
11
+ // status.textContent = 'Ready';
12
 
13
  inputSubmitBtn.addEventListener('click', async (e) => {
14
  e.preventDefault();
 
15
  let result = await classifier(inputText.value);
16
  console.log(result);
17
  showOutput();