mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-19 04:32:32 +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
|
||||
|
||||
# some models require Torch
|
||||
try:
|
||||
import torch
|
||||
from thinc.util import has_torch
|
||||
if has_torch:
|
||||
from .coref import * #noqa
|
||||
from .span_predictor import * #noqa
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user