huggingface input_error ai_generated true

ValueError: zero-shot classification labels invalid

ID: huggingface/zero-shot-label-error

Also available as: JSON · Markdown
85%Fix Rate
88%Confidence
3Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
4 active

Root Cause

Zero-shot classification called with invalid labels.

generic

Workarounds

  1. 92% success Provide descriptive string labels: candidate_labels=["positive","negative"]
  2. 85% success Use hypothesis_template for better accuracy

Dead Ends

Common approaches that don't work:

  1. Use empty labels list 90% fail

    No classification possible

  2. Use numeric IDs as labels 80% fail

    Model expects natural language