luisespinosa commited on
Commit
8bddc41
β€’
1 Parent(s): 614f5ca

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -22
README.md CHANGED
@@ -29,8 +29,8 @@ labels=[]
29
  mapping_link = f"https://raw.githubusercontent.com/cardiffnlp/tweeteval/main/datasets/{task}/mapping.txt"
30
  with urllib.request.urlopen(mapping_link) as f:
31
  html = f.read().decode('utf-8').split("\n")
32
- spamreader = csv.reader(html[:-1], delimiter='\t')
33
- labels = [row[1] for row in spamreader]
34
 
35
  # PT
36
  model = AutoModelForSequenceClassification.from_pretrained(MODEL)
@@ -64,24 +64,6 @@ for i in range(scores.shape[0]):
64
  Output:
65
 
66
  ```
67
- 1) 😘 0.2637
68
- 2) ❀️ 0.1952
69
- 3) πŸ’• 0.1171
70
- 4) ✨ 0.0927
71
- 5) 😊 0.0756
72
- 6) πŸ’œ 0.046
73
- 7) πŸ’™ 0.0444
74
- 8) 😍 0.0272
75
- 9) πŸ˜‰ 0.0228
76
- 10) 😎 0.0198
77
- 11) 😜 0.0166
78
- 12) πŸ˜‚ 0.0132
79
- 13) 😁 0.0131
80
- 14) β˜€ 0.0112
81
- 15) πŸŽ„ 0.009
82
- 16) πŸ’― 0.009
83
- 17) πŸ”₯ 0.008
84
- 18) πŸ“· 0.0057
85
- 19) πŸ‡ΊπŸ‡Έ 0.005
86
- 20) πŸ“Έ 0.0048
87
  ```
 
29
  mapping_link = f"https://raw.githubusercontent.com/cardiffnlp/tweeteval/main/datasets/{task}/mapping.txt"
30
  with urllib.request.urlopen(mapping_link) as f:
31
  html = f.read().decode('utf-8').split("\n")
32
+ csvreader = csv.reader(html, delimiter='\t')
33
+ labels = [row[1] for row in csvreader if len(row) > 1]
34
 
35
  # PT
36
  model = AutoModelForSequenceClassification.from_pretrained(MODEL)
 
64
  Output:
65
 
66
  ```
67
+ 1) not-hate 0.9168
68
+ 2) hate 0.0832
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  ```