报错
RuntimeError: Failed to import transformers.models.gpt2.modeling_gpt2 because of the following error (look up to see its traceback):
Failed to import transformers.onnx.config because of the following error (look up to see its traceback):
cannot import name ‘Image’ from ‘PIL’ (unknown location)
在这里插入图片描述
在这里插入图片描述

**

将transformers版本从4.23.1换到4.16.2就好了

**

Logo

鸿蒙生态一站式服务平台。

更多推荐