Update README.md
This commit is contained in:
parent
c3f00119f3
commit
aa7cb4cab2
|
@ -29,8 +29,8 @@ labels=[]
|
|||
mapping_link = f"https://raw.githubusercontent.com/cardiffnlp/tweeteval/main/datasets/{task}/mapping.txt"
|
||||
with urllib.request.urlopen(mapping_link) as f:
|
||||
html = f.read().decode('utf-8').split("\n")
|
||||
spamreader = csv.reader(html[:-1], delimiter='\t')
|
||||
labels = [row[1] for row in spamreader]
|
||||
csvreader = csv.reader(html, delimiter='\t')
|
||||
labels = [row[1] for row in csvreader if len(row) > 1]
|
||||
|
||||
# PT
|
||||
model = AutoModelForSequenceClassification.from_pretrained(MODEL)
|
||||
|
|
Loading…
Reference in New Issue