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 12, 2024
1 parent 631f7b7 commit 771904b
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,11 @@
"source": [
"def load_dataset(split):\n",
" config_kwargs = {\"name\": \"title_genre_classifiction\"}\n",
" dataset = datasets.load_dataset(\"blbooksgenre\", split=split, trust_remote_code=True, **config_kwargs)\n",
" dataset = datasets.load_dataset(\n",
" \"blbooksgenre\",\n",
" split=split,\n",
" trust_remote_code=True,\n",
" **config_kwargs)\n",
" return pd.DataFrame({\"text\": dataset[\"title\"], \"label\": dataset[\"label\"]})\n",
"\n",
"\n",
Expand Down Expand Up @@ -447,7 +451,8 @@
" max_retries=max_retries,\n",
" retry_delay=retry_delay)\n",
" model = AutoModelForSequenceClassification.from_pretrained(\n",
" BLBOOKSGENRE_MODEL_NAME, num_labels=NUM_LABELS)\n",
" BLBOOKSGENRE_MODEL_NAME, num_labels=NUM_LABELS,\n",
" trust_remote_code=True)\n",
" return model\n",
"\n",
"\n",
Expand Down

0 comments on commit 771904b

Please sign in to comment.