Install the transformers library when running on Colab
parent
0a55f55372
commit
3d418c0308
|
@ -57,6 +57,7 @@
|
|||
" # %tensorflow_version only exists in Colab.\n",
|
||||
" %tensorflow_version 2.x\n",
|
||||
" !pip install -q -U tensorflow-addons\n",
|
||||
" !pip install -q -U transformers\n",
|
||||
" IS_COLAB = True\n",
|
||||
"except Exception:\n",
|
||||
" IS_COLAB = False\n",
|
||||
|
@ -2615,7 +2616,6 @@
|
|||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!pip install -q -U transformers\n",
|
||||
"from transformers import TFOpenAIGPTLMHeadModel\n",
|
||||
"\n",
|
||||
"model = TFOpenAIGPTLMHeadModel.from_pretrained(\"openai-gpt\")"
|
||||
|
|
Loading…
Reference in New Issue