Views
No views yet
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model = AutoModelForCausalLM.from_pretrained("https://huggingface.co/Wexnflex/Tweet_Sentiment")
4tokenizer = AutoTokenizer.from_pretrained("https://huggingface.co/Wexnflex/Tweet_Sentiment")
5
6text = "Input your text here."
7inputs = tokenizer(text, return_tensors="pt")
8outputs = model.generate(**inputs)
9print(tokenizer.decode(outputs[0]))
10
11
12
13#### Training Hyperparameters
14
15Training Hyperparameters
16Batch size: 16
17Learning rate: 2e-5
18Epochs: 3
19Optimizer: AdamW
20
21#### Testing Data, Factors & Metrics
22
23#### Testing Data
24
25The evaluation was performed on the test split of the "Tweet Sentiment Extraction" dataset.
26
27
28#### Factors
29
30Evaluation is segmented by sentiment labels (e.g., positive, negative, neutral).
31
32
33#### Metrics
34
35Accuracy
36
37### Results
38
3970% Accuracy
40#### Summary
41
42The fine-tuned model performs well for extracting sentiment-relevant text, with room for improvement in handling ambiguous cases.
43
44
45## Technical Specifications [optional]
46
47
48#### Hardware
49
50T4 GPU (Google Colab)
51#### Software
52
53Hugging Face Transformers Library
54