Spaces:
Sleeping
Sleeping
jschwaller
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -8,9 +8,9 @@ import tensorflow as tf
|
|
8 |
import transformers
|
9 |
from transformers import pipeline
|
10 |
from transformers import RobertaTokenizer, RobertaModel
|
11 |
-
from transformers import AutoModelForSequenceClassification
|
12 |
from transformers import TFAutoModelForSequenceClassification
|
13 |
-
from transformers import AutoTokenizer
|
14 |
|
15 |
import matplotlib.pyplot as plt
|
16 |
import sys
|
@@ -20,7 +20,7 @@ csv.field_size_limit(sys.maxsize)
|
|
20 |
|
21 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
22 |
|
23 |
-
tokenizer = AutoTokenizer.from_pretrained("jschwaller/ADRv2024")
|
24 |
model = AutoModelForSequenceClassification.from_pretrained("jschwaller/ADRv2024")
|
25 |
|
26 |
# build a pipeline object to do predictions
|
|
|
8 |
import transformers
|
9 |
from transformers import pipeline
|
10 |
from transformers import RobertaTokenizer, RobertaModel
|
11 |
+
from transformers import AutoModelForSequenceClassification, AutoModelForTokenClassification
|
12 |
from transformers import TFAutoModelForSequenceClassification
|
13 |
+
from transformers import AutoTokenizer
|
14 |
|
15 |
import matplotlib.pyplot as plt
|
16 |
import sys
|
|
|
20 |
|
21 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
22 |
|
23 |
+
tokenizer = AutoTokenizer.from_pretrained("jschwaller/ADRv2024")
|
24 |
model = AutoModelForSequenceClassification.from_pretrained("jschwaller/ADRv2024")
|
25 |
|
26 |
# build a pipeline object to do predictions
|