mirror of
https://github.com/ArthurDanjou/handson-ml3.git
synced 2026-01-14 12:14:36 +01:00
Install the transformers library when running on Colab
This commit is contained in:
@@ -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\")"
|
||||
|
||||
Reference in New Issue
Block a user