ImportError: cannot import name 'AutoModelForQuestionAnswering' from 'transformers
See original GitHub issueHi friends,
I would like to use transformers library. But while import I received this error.
This code:
from transformers import AutoTokenizer, AutoModelForQuestionAnswering, pipeline
import torch
# LOAD MODEL
tokenizer = AutoTokenizer.from_pretrained("savasy/bert-base-turkish-squad")
model = AutoModelForQuestionAnswering.from_pretrained("savasy/bert-base-turkish-squad")
Error
ImportError: cannot import name ‘AutoModelForQuestionAnswering’ from ‘transformers’ (C:\Users\oguzk\anaconda3\lib\site-packages\transformers_init_.py)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
ImportError: cannot import name 'AutoModelWithLMHead ...
This is literally all the code that I am trying to run: from transformers import ...
Read more >cannot import name 'get_scheduler' from 'transformers ...
Hi, I'm new to Transformer models, just following the tutorials. ... ImportError: cannot import name 'get_scheduler' from 'transformers'.
Read more >cannot import name 'TFAutoModel' from 'transformers'
ImportError : cannot import name 'TFAutoModel' from 'transformers'. Add Answer | View In TPC Matrix. Technical Problem Cluster First Answered On May 29, ......
Read more >Import Errors - Google Groups
If I import transformers, I get a similar ImportError but the traceback ... ImportError: cannot import name 'NullHandler' from partially ...
Read more >no module named 'tokenizers' - You.com | The AI Search ...
File "E:\work\pycharm\transformers-master\src\transformers\tokenization_bert.py", line 24, in from tokenizers import BertWordPieceTokenizer ImportError: No ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I installed pytorch library.
How did you solve it?