Traceback (most recent call last):
File "C:\Users\李想\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\utils\import_utils.py", line 1110, in _get_module
return importlib.import_module("." + module_name, self.name)
File "C:\Users\李想\AppData\Local\Programs\Python\Python310\lib\importlib__init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\models\t5\modeling_t5.py", line 25, in
from torch import nn
File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\init.py", line 1, in
from .modules import * # noqa: F403
File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\init__.py", line 1, in
from .module import Module
File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 8, in
from ..parameter import Parameter
File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\parameter.py", line 2, in
from torch._C import _disabled_torch_function_impl
ImportError: DLL load failed while importing _C: 找不到指定的模块。
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Desktop\ChatYuan\app_gradio.py", line 5, in
from transformers import T5Tokenizer, T5ForConditionalGeneration
File "", line 1075, in _handle_fromlist
File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\utils\import_utils.py", line 1101, in getattr
value = getattr(module, name)
File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\utils\import_utils.py", line 1100, in getattr
module = self._get_module(self._class_to_module[name])
File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\utils\import_utils.py", line 1112, in _get_module
raise RuntimeError(
RuntimeError: Failed to import transformers.models.t5.modeling_t5 because of the following error (look up to see its traceback):
DLL load failed while importing _C: 找不到指定的模块。
Traceback (most recent call last): File "C:\Users\李想\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\utils\import_utils.py", line 1110, in _get_module return importlib.import_module("." + module_name, self.name) File "C:\Users\李想\AppData\Local\Programs\Python\Python310\lib\importlib__init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\models\t5\modeling_t5.py", line 25, in
from torch import nn
File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\ init.py", line 1, in
from .modules import * # noqa: F403
File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\ init__.py", line 1, in
from .module import Module
File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 8, in
from ..parameter import Parameter
File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\parameter.py", line 2, in
from torch._C import _disabled_torch_function_impl
ImportError: DLL load failed while importing _C: 找不到指定的模块。
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "C:\Users\Desktop\ChatYuan\app_gradio.py", line 5, in
from transformers import T5Tokenizer, T5ForConditionalGeneration
File "", line 1075, in _handle_fromlist
File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\utils\import_utils.py", line 1101, in getattr
value = getattr(module, name)
File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\utils\import_utils.py", line 1100, in getattr
module = self._get_module(self._class_to_module[name])
File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\utils\import_utils.py", line 1112, in _get_module
raise RuntimeError(
RuntimeError: Failed to import transformers.models.t5.modeling_t5 because of the following error (look up to see its traceback):
DLL load failed while importing _C: 找不到指定的模块。