mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-19 20:52:23 +03:00
Use thinc.util.has_torch
This commit is contained in:
parent
b1118cee58
commit
5cbc9f4573
|
@ -7,10 +7,8 @@ from .textcat import * # noqa
|
||||||
from .tok2vec import * # noqa
|
from .tok2vec import * # noqa
|
||||||
|
|
||||||
# some models require Torch
|
# some models require Torch
|
||||||
try:
|
from thinc.util import has_torch
|
||||||
import torch
|
if has_torch:
|
||||||
from .coref import * #noqa
|
from .coref import * #noqa
|
||||||
from .span_predictor import * #noqa
|
from .span_predictor import * #noqa
|
||||||
except ImportError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user