Update classify-dataset.py

#8
Files changed (1) hide show
  1. classify-dataset.py +3 -2
classify-dataset.py CHANGED
@@ -1,7 +1,8 @@
1
  #!/usr/bin/env python3
2
  # /// script
3
- # requires-python = ">=3.12"
4
  # dependencies = [
 
5
  # "sieves[engines]>=0.17.4",
6
  # "typer>=0.12,<1",
7
  # "datasets",
@@ -406,7 +407,7 @@ def classify(
406
  zeroshot_tag = "zero-shot-classification"
407
  # Explicitly designed for zero-shot classification: build directly as pipeline.
408
  if info.pipeline_tag == zeroshot_tag or zeroshot_tag in set(info.tags or []):
409
- logger.info("Initializing zero-shot classifciation pipeline.")
410
  model = transformers.pipeline(zeroshot_tag, model=model, device=device)
411
  # Otherwise: build Outlines model around it to enforce structured generation.
412
  else:
 
1
  #!/usr/bin/env python3
2
  # /// script
3
+ # requires-python = "==3.12"
4
  # dependencies = [
5
+ # "transformers[torch]>=4.35",
6
  # "sieves[engines]>=0.17.4",
7
  # "typer>=0.12,<1",
8
  # "datasets",
 
407
  zeroshot_tag = "zero-shot-classification"
408
  # Explicitly designed for zero-shot classification: build directly as pipeline.
409
  if info.pipeline_tag == zeroshot_tag or zeroshot_tag in set(info.tags or []):
410
+ logger.info("Initializing zero-shot classification pipeline.")
411
  model = transformers.pipeline(zeroshot_tag, model=model, device=device)
412
  # Otherwise: build Outlines model around it to enforce structured generation.
413
  else: