Views
No views yet
0 for "Continue conversation"1 for "End conversation."| Class | Precision | Recall | F1-Score | Support |
|---|---|---|---|---|
| False (Continue) | 0.87 | 0.97 | 0.91 | 313 |
| True (End) | 0.87 | 0.58 | 0.70 | 112 |
| Macro Average | 0.87 | 0.77 | 0.80 | - |
| Weighted Average | 0.87 | 0.87 | 0.86 | - |
1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2
3# Load tokenizer and model
4tokenizer = AutoTokenizer.from_pretrained("MathewManoj/EndConvo-health-deberta-v2")
5model = AutoModelForSequenceClassification.from_pretrained("MathewManoj/EndConvo-health-deberta-v2")
6
7# Example text input
8text = "Thank you for your help. I don't have any more questions."
9
10# Tokenize the input
11inputs = tokenizer(text, return_tensors="pt")
12outputs = model(**inputs)
13
14# Prediction
15prediction = outputs.logits.argmax(dim=-1).item()
16print("Prediction:", "End" if prediction == 1 else "Continue")torchtransformerssafetensorsnumpy1name: huggingface-env
2channels:
3 - defaults
4 - conda-forge
5dependencies:
6 - python=3.8
7 - pip
8 - pip:
9 - torch==2.4.1
10 - transformers==4.46.3
11 - safetensors