Text Classification
Transformers
Safetensors
decision-model
classification
julia
open-jev
head-finetune
low-resource
Instructions to use SHSLab/Qyvos with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SHSLab/Qyvos with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="SHSLab/Qyvos")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("SHSLab/Qyvos", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 595 Bytes
31f7037 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | """Presentation rules for decision probabilities; logits and selection stay raw."""
def display_probabilities(probabilities):
values = list(probabilities)
if not values:
return values
winner = max(range(len(values)), key=values.__getitem__)
if values[winner] > 0.95 and all(
value < 0.045 for i, value in enumerate(values) if i != winner
):
return [1.0 if i == winner else 0.0 for i in range(len(values))]
visible = [value if value >= 0.01 else 0.0 for value in values]
total = sum(visible)
return [value / total for value in visible]
|