From aa7cb4cab2a7400213e340cf6b47b9ecd280be1b Mon Sep 17 00:00:00 2001 From: Cardiff NLP Date: Thu, 12 Nov 2020 17:46:05 +0000 Subject: [PATCH] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f8e7761..0c43008 100644 --- a/README.md +++ b/README.md @@ -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)