Spaces:
Sleeping
Sleeping
OnlyBiggg
commited on
Commit
·
af86a55
1
Parent(s):
c6554d8
fix device cpu
Browse files- app/ner/services/ner.py +2 -1
app/ner/services/ner.py
CHANGED
|
@@ -17,7 +17,8 @@ class NER:
|
|
| 17 |
self.pipeline = pipeline(task=settings.TASK_NAME,
|
| 18 |
model=self.model,
|
| 19 |
tokenizer=self.tokenizer,
|
| 20 |
-
|
|
|
|
| 21 |
|
| 22 |
def predict(self, text: str, entity_tag: str = None):
|
| 23 |
if self.pipeline is None:
|
|
|
|
| 17 |
self.pipeline = pipeline(task=settings.TASK_NAME,
|
| 18 |
model=self.model,
|
| 19 |
tokenizer=self.tokenizer,
|
| 20 |
+
# accelerator=settings.ACCELERATOR,
|
| 21 |
+
device=settings.DEVICE)
|
| 22 |
|
| 23 |
def predict(self, text: str, entity_tag: str = None):
|
| 24 |
if self.pipeline is None:
|