Spaces:
Sleeping
Sleeping
| title: Zero-Shot Text Classifier | |
| emoji: 🏷️ | |
| colorFrom: blue | |
| colorTo: indigo | |
| sdk: gradio | |
| sdk_version: "5.33.0" | |
| app_file: app.py | |
| pinned: false | |
| license: apache-2.0 | |
| short_description: Classify text into any custom categories with Qwen3-0.6B | |
| # Zero-Shot Text Classifier | |
| Classify any text into your own custom categories using **Qwen3-0.6B** with zero-shot instruction prompting. | |
| ## Features | |
| - **Custom labels**: Define any categories you want | |
| - **Multi-label mode**: Allow multiple labels to apply simultaneously | |
| - **Preset label sets**: Quick-start with Sentiment, Topic, Intent, or Tone presets | |
| - **Fast inference**: ~200ms on GPU via ZeroGPU | |
| ## Why Qwen3 over BART-MNLI? | |
| - Qwen3-0.6B is smaller (0.6B vs 0.4B) but more capable due to modern architecture | |
| - Handles multi-label classification natively via instruction prompting | |
| - Supports structured JSON output for downstream integration | |
| - Better accuracy on diverse classification tasks (not limited to NLI-style inference) | |
| ## API Usage | |
| ```python | |
| from gradio_client import Client | |
| client = Client("xavier-fuentes/text-classifier") | |
| result = client.predict( | |
| text="The product quality is amazing but shipping was slow", | |
| candidate_labels="positive, negative, mixed", | |
| multi_label=False, | |
| api_name="/run_classification" | |
| ) | |
| ``` | |
| Built by [Xavier Fuentes](https://huggingface.co/xavier-fuentes) @ [AI Enablement Academy](https://enablement.academy) | |