Unverified Commit 215bb408 authored by Pedro Cuenca's avatar Pedro Cuenca Committed by GitHub
Browse files

Fix import if PyTorch is not installed (#715)

* Fix import if PyTorch is not installed.

* Style (blank line)
parent 5ac1f61c
...@@ -37,7 +37,10 @@ from .import_utils import ( ...@@ -37,7 +37,10 @@ from .import_utils import (
) )
from .logging import get_logger from .logging import get_logger
from .outputs import BaseOutput from .outputs import BaseOutput
from .testing_utils import floats_tensor, load_image, parse_flag_from_env, slow, torch_device
if is_torch_available():
from .testing_utils import floats_tensor, load_image, parse_flag_from_env, slow, torch_device
logger = get_logger(__name__) logger = get_logger(__name__)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment