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

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +3 -1
index.js CHANGED
@@ -5,9 +5,11 @@ const status = document.getElementById('status');
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 detector = await pipeline('token-classification', 'Setosm/bert-finetuned-for-medical-ner');
11
  status.textContent = 'Ready';
12
 
13
  inputSubmitBtn.addEventListener('click', async (e) => {
 
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) => {