Fix script in docs/examples; use `classify` command.
#5
by
mit-ra
- opened
- classify-dataset.py +6 -6
classify-dataset.py
CHANGED
|
@@ -16,7 +16,7 @@ It supports both single-label (default) and multi-label classification via a fla
|
|
| 16 |
Examples
|
| 17 |
--------
|
| 18 |
Single-label classification:
|
| 19 |
-
uv run
|
| 20 |
--input-dataset stanfordnlp/imdb \
|
| 21 |
--column text \
|
| 22 |
--labels "positive,negative" \
|
|
@@ -24,7 +24,7 @@ Examples
|
|
| 24 |
--output-dataset your-username/imdb-classified
|
| 25 |
|
| 26 |
With label descriptions:
|
| 27 |
-
uv run
|
| 28 |
--input-dataset user/support-tickets \
|
| 29 |
--column content \
|
| 30 |
--labels "bug,feature,question" \
|
|
@@ -33,7 +33,7 @@ Examples
|
|
| 33 |
--output-dataset your-username/tickets-classified
|
| 34 |
|
| 35 |
Multi-label classification (adds a multi-hot labels column):
|
| 36 |
-
uv run
|
| 37 |
--input-dataset ag_news \
|
| 38 |
--column text \
|
| 39 |
--labels "world,sports,business,science" \
|
|
@@ -468,14 +468,14 @@ def show_examples() -> None:
|
|
| 468 |
cmds = [
|
| 469 |
"Example commands:",
|
| 470 |
"\n# Simple classification:",
|
| 471 |
-
"uv run
|
| 472 |
" --input-dataset stanfordnlp/imdb \\",
|
| 473 |
" --column text \\",
|
| 474 |
" --labels 'positive,negative' \\",
|
| 475 |
" --model MoritzLaurer/deberta-v3-large-zeroshot-v2.0 \\",
|
| 476 |
" --output-dataset your-username/imdb-classified",
|
| 477 |
"\n# With label descriptions:",
|
| 478 |
-
"uv run
|
| 479 |
" --input-dataset user/support-tickets \\",
|
| 480 |
" --column content \\",
|
| 481 |
" --labels 'bug,feature,question' \\",
|
|
@@ -484,7 +484,7 @@ def show_examples() -> None:
|
|
| 484 |
" --model MoritzLaurer/deberta-v3-large-zeroshot-v2.0 \\",
|
| 485 |
" --output-dataset your-username/tickets-classified",
|
| 486 |
"\n# Multi-label classification:",
|
| 487 |
-
"uv run
|
| 488 |
" --input-dataset ag_news \\",
|
| 489 |
" --column text \\",
|
| 490 |
" --labels 'world,sports,business,science' \\",
|
|
|
|
| 16 |
Examples
|
| 17 |
--------
|
| 18 |
Single-label classification:
|
| 19 |
+
uv run classify-dataset.py classify \
|
| 20 |
--input-dataset stanfordnlp/imdb \
|
| 21 |
--column text \
|
| 22 |
--labels "positive,negative" \
|
|
|
|
| 24 |
--output-dataset your-username/imdb-classified
|
| 25 |
|
| 26 |
With label descriptions:
|
| 27 |
+
uv run classify-dataset.py classify \
|
| 28 |
--input-dataset user/support-tickets \
|
| 29 |
--column content \
|
| 30 |
--labels "bug,feature,question" \
|
|
|
|
| 33 |
--output-dataset your-username/tickets-classified
|
| 34 |
|
| 35 |
Multi-label classification (adds a multi-hot labels column):
|
| 36 |
+
uv run classify-dataset.py classify \
|
| 37 |
--input-dataset ag_news \
|
| 38 |
--column text \
|
| 39 |
--labels "world,sports,business,science" \
|
|
|
|
| 468 |
cmds = [
|
| 469 |
"Example commands:",
|
| 470 |
"\n# Simple classification:",
|
| 471 |
+
"uv run classify-dataset.py classify \\",
|
| 472 |
" --input-dataset stanfordnlp/imdb \\",
|
| 473 |
" --column text \\",
|
| 474 |
" --labels 'positive,negative' \\",
|
| 475 |
" --model MoritzLaurer/deberta-v3-large-zeroshot-v2.0 \\",
|
| 476 |
" --output-dataset your-username/imdb-classified",
|
| 477 |
"\n# With label descriptions:",
|
| 478 |
+
"uv run classify-dataset.py classify \\",
|
| 479 |
" --input-dataset user/support-tickets \\",
|
| 480 |
" --column content \\",
|
| 481 |
" --labels 'bug,feature,question' \\",
|
|
|
|
| 484 |
" --model MoritzLaurer/deberta-v3-large-zeroshot-v2.0 \\",
|
| 485 |
" --output-dataset your-username/tickets-classified",
|
| 486 |
"\n# Multi-label classification:",
|
| 487 |
+
"uv run classify-dataset.py classify \\",
|
| 488 |
" --input-dataset ag_news \\",
|
| 489 |
" --column text \\",
|
| 490 |
" --labels 'world,sports,business,science' \\",
|