Skip to content

Commit

Permalink
Update responsibleaidashboard-text-classification-blbooksgenre.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
tongyu-microsoft committed Jul 15, 2024
1 parent fbad1c1 commit 8d43554
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"metadata": {},
"outputs": [],
"source": [
"rai_example_version_string = \"33\""
"rai_example_version_string = \"34\""
]
},
{
Expand Down Expand Up @@ -129,10 +129,8 @@
"def load_dataset(split):\n",
" config_kwargs = {\"name\": \"title_genre_classifiction\"}\n",
" dataset = datasets.load_dataset(\n",
" \"blbooksgenre\",\n",
" split=split,\n",
" trust_remote_code=True,\n",
" **config_kwargs)\n",
" \"blbooksgenre\", split=split, trust_remote_code=True, **config_kwargs\n",
" )\n",
" return pd.DataFrame({\"text\": dataset[\"title\"], \"label\": dataset[\"label\"]})\n",
"\n",
"\n",
Expand Down Expand Up @@ -451,8 +449,7 @@
" max_retries=max_retries,\n",
" retry_delay=retry_delay)\n",
" model = AutoModelForSequenceClassification.from_pretrained(\n",
" BLBOOKSGENRE_MODEL_NAME, num_labels=NUM_LABELS,\n",
" trust_remote_code=True)\n",
" BLBOOKSGENRE_MODEL_NAME, num_labels=NUM_LABELS)\n",
" return model\n",
"\n",
"\n",
Expand Down

0 comments on commit 8d43554

Please sign in to comment.