Spaces:
Running
Running
Commit
•
d8d3649
1
Parent(s):
c531e21
Update gramformer.py
Browse files- gramformer.py +3 -1
gramformer.py
CHANGED
@@ -5,7 +5,9 @@ class Gramformer:
|
|
5 |
from transformers import AutoModelForSeq2SeqLM
|
6 |
#from lm_scorer.models.auto import AutoLMScorer as LMScorer
|
7 |
import errant
|
8 |
-
|
|
|
|
|
9 |
|
10 |
if use_gpu:
|
11 |
device= "cuda:0"
|
|
|
5 |
from transformers import AutoModelForSeq2SeqLM
|
6 |
#from lm_scorer.models.auto import AutoLMScorer as LMScorer
|
7 |
import errant
|
8 |
+
import en_core_web_sm
|
9 |
+
nlp = en_core_web_sm.load()
|
10 |
+
annotator = errant.load('en', nlp)
|
11 |
|
12 |
if use_gpu:
|
13 |
device= "cuda:0"
|