Update README.md (#4315)

This commit is contained in:
Savaş Yıldırım
2020-05-12 22:01:34 +03:00
committed by GitHub
parent 15d45211f7
commit 15a121fec5

View File

@@ -121,8 +121,8 @@ Suppose your file has lots of lines of comment and label (1 or 0) at the end (t
from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
f="/path/to/your/file/yourfile.tsv"
model = AutoModelForSequenceClassification.from_pretrained(folder)
tokenizer = AutoTokenizer.from_pretrained(folder)
model = AutoModelForSequenceClassification.from_pretrained("savasy/bert-base-turkish-sentiment-cased")
tokenizer = AutoTokenizer.from_pretrained("savasy/bert-base-turkish-sentiment-cased")
sa= pipeline("sentiment-analysis", tokenizer=tokenizer, model=model)
i,crr=0,0