Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,8 @@ import torch
|
|
3 |
from datasets import load_dataset
|
4 |
|
5 |
dataset = load_dataset("zeroshot/twitter-financial-news-sentiment", )
|
6 |
-
|
|
|
7 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
8 |
|
9 |
model = AutoModelForSequenceClassification.from_pretrained("bert-base-uncased")
|
@@ -16,7 +17,7 @@ def sentiment_score(review):
|
|
16 |
|
17 |
dataset['sentiment'] = dataset['text'].apply(lambda x: sentiment_score(x[:512]))
|
18 |
|
19 |
-
|
20 |
|
21 |
"""
|
22 |
categories = ('Car in good condition','Damaged Car')
|
|
|
3 |
from datasets import load_dataset
|
4 |
|
5 |
dataset = load_dataset("zeroshot/twitter-financial-news-sentiment", )
|
6 |
+
print(dataset[:10])
|
7 |
+
break
|
8 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
9 |
|
10 |
model = AutoModelForSequenceClassification.from_pretrained("bert-base-uncased")
|
|
|
17 |
|
18 |
dataset['sentiment'] = dataset['text'].apply(lambda x: sentiment_score(x[:512]))
|
19 |
|
20 |
+
|
21 |
|
22 |
"""
|
23 |
categories = ('Car in good condition','Damaged Car')
|