Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -10,11 +10,11 @@ def load_healthcare_ner_pipeline():
|
|
10 |
"""Load the Hugging Face pipeline for Healthcare NER."""
|
11 |
global ner_pipeline
|
12 |
if ner_pipeline is None:
|
13 |
-
login(token=os.environ["
|
14 |
ner_pipeline = pipeline(
|
15 |
"token-classification",
|
16 |
model="TypicaAI/HealthcareNER-Fr",
|
17 |
-
use_auth_token=os.environ["
|
18 |
aggregation_strategy="simple" # Groups B- and I- tokens into entities
|
19 |
)
|
20 |
return ner_pipeline
|
|
|
10 |
"""Load the Hugging Face pipeline for Healthcare NER."""
|
11 |
global ner_pipeline
|
12 |
if ner_pipeline is None:
|
13 |
+
login(token=os.environ["HFTOKEN"])
|
14 |
ner_pipeline = pipeline(
|
15 |
"token-classification",
|
16 |
model="TypicaAI/HealthcareNER-Fr",
|
17 |
+
use_auth_token=os.environ["HFTOKEN"],
|
18 |
aggregation_strategy="simple" # Groups B- and I- tokens into entities
|
19 |
)
|
20 |
return ner_pipeline
|