Home › Forums › Fórum Processamento de Linguagem Natural com BERT e Python › Módulo: Aplicação de Perguntas e respostas – não funciona
- This topic has 1 reply, 2 voices, and was last updated 4 years, 10 months ago by
Fábio Spak.
- AuthorPosts
- 15 de julho de 2021 at 21:17 #29775
Acredito que seja devido a versão mas não estou conseguindo arrumar para funcionar. Mesmo utilizando o Colab oferecido do professor, apresenta o mesmo erro:
—————————————————————————
ImportError Traceback (most recent call last)
<ipython-input-3-54bf038f0233> in <module>()
—-> 1 import tensorflow_hub as hub
2 from official.nlp.bert.tokenization import FullTokenizer
3 from official.nlp.bert.input_pipeline import create_squad_dataset
4 from official.nlp.data.squad_lib import generate_tf_record_from_json_file
5 from official.nlp import optimization22 frames
/usr/local/lib/python3.7/dist-packages/keras/api/_v2/keras/__init__.py in <module>()
8 import sys as _sys
9
—> 10 from keras import __version__
11 from keras.api._v2.keras import __internal__
12 from keras.api._v2.keras import activationsImportError: cannot import name ‘__version__’ from ‘keras’ (/usr/local/lib/python3.7/dist-packages/keras/__init__.py)
—————————————————————————
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.To view examples of installing some common dependencies, click the
“Open Examples” button below.
—————————————————————————Poderia ajudar a solucionar? Pois dessa forma, qualquer um que fizer o curso não poderá concluir se isso não for solucionado 🙁
15 de julho de 2021 at 22:20 #29777Olá Kezia, tente utilizar as versões abaixo:
!pip install sentencepiece !pip install tf-models-nightly==2.4.0.dev20210501 !pip install tf-nightly==2.6.0.dev20210501
Fabio
- AuthorPosts
- You must be logged in to reply to this topic.
