Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
15a121fe
Unverified
Commit
15a121fe
authored
May 12, 2020
by
Savaş Yıldırım
Committed by
GitHub
May 12, 2020
Browse files
Update README.md (#4315)
parent
15d45211
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
model_cards/savasy/bert-base-turkish-sentiment-cased/README.md
..._cards/savasy/bert-base-turkish-sentiment-cased/README.md
+2
-2
No files found.
model_cards/savasy/bert-base-turkish-sentiment-cased/README.md
View file @
15a121fe
...
@@ -121,8 +121,8 @@ Suppose your file has lots of lines of comment and label (1 or 0) at the end (t
...
@@ -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
from
transformers
import
AutoModelForSequenceClassification
,
AutoTokenizer
,
pipeline
f
=
"/path/to/your/file/yourfile.tsv"
f
=
"/path/to/your/file/yourfile.tsv"
model
=
AutoModelForSequenceClassification
.
from_pretrained
(
folder
)
model
=
AutoModelForSequenceClassification
.
from_pretrained
(
"savasy/bert-base-turkish-sentiment-cased"
)
tokenizer
=
AutoTokenizer
.
from_pretrained
(
folder
)
tokenizer
=
AutoTokenizer
.
from_pretrained
(
"savasy/bert-base-turkish-sentiment-cased"
)
sa
=
pipeline
(
"sentiment-analysis"
,
tokenizer
=
tokenizer
,
model
=
model
)
sa
=
pipeline
(
"sentiment-analysis"
,
tokenizer
=
tokenizer
,
model
=
model
)
i
,
crr
=
0
,
0
i
,
crr
=
0
,
0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment