Spaces:
Running
Running
miesnerjacob
commited on
Commit
β’
e99a699
1
Parent(s):
2644c54
fixed class defintion syntax
Browse files- emotion_detection.py +1 -1
- named_entity_recognition.py +1 -1
- part_of_speech_tagging.py +1 -1
- sentiment_analysis.py +1 -1
emotion_detection.py
CHANGED
@@ -4,7 +4,7 @@ import torch
|
|
4 |
import pandas as pd
|
5 |
|
6 |
|
7 |
-
class EmotionDetection
|
8 |
def __init__(self, chunksize=512):
|
9 |
hub_location = 'cardiffnlp/twitter-roberta-base-emotion'
|
10 |
self.tokenizer = AutoTokenizer.from_pretrained(hub_location)
|
|
|
4 |
import pandas as pd
|
5 |
|
6 |
|
7 |
+
class EmotionDetection:
|
8 |
def __init__(self, chunksize=512):
|
9 |
hub_location = 'cardiffnlp/twitter-roberta-base-emotion'
|
10 |
self.tokenizer = AutoTokenizer.from_pretrained(hub_location)
|
named_entity_recognition.py
CHANGED
@@ -2,7 +2,7 @@ from transformers import AutoTokenizer, AutoModelForTokenClassification
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
|
5 |
-
class NamedEntityRecognition
|
6 |
def __init__(self):
|
7 |
tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-large-finetuned-conll03-english")
|
8 |
model = AutoModelForTokenClassification.from_pretrained("xlm-roberta-large-finetuned-conll03-english")
|
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
|
5 |
+
class NamedEntityRecognition:
|
6 |
def __init__(self):
|
7 |
tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-large-finetuned-conll03-english")
|
8 |
model = AutoModelForTokenClassification.from_pretrained("xlm-roberta-large-finetuned-conll03-english")
|
part_of_speech_tagging.py
CHANGED
@@ -4,7 +4,7 @@ nltk.download('punkt')
|
|
4 |
nltk.download('averaged_perceptron_tagger')
|
5 |
|
6 |
|
7 |
-
class POSTagging
|
8 |
def __init__(self):
|
9 |
pass
|
10 |
|
|
|
4 |
nltk.download('averaged_perceptron_tagger')
|
5 |
|
6 |
|
7 |
+
class POSTagging:
|
8 |
def __init__(self):
|
9 |
pass
|
10 |
|
sentiment_analysis.py
CHANGED
@@ -4,7 +4,7 @@ import torch
|
|
4 |
import pandas as pd
|
5 |
|
6 |
|
7 |
-
class SentimentAnalysis
|
8 |
def __init__(self):
|
9 |
# Load Tokenizer & Model
|
10 |
hub_location = 'cardiffnlp/twitter-roberta-base-sentiment'
|
|
|
4 |
import pandas as pd
|
5 |
|
6 |
|
7 |
+
class SentimentAnalysis:
|
8 |
def __init__(self):
|
9 |
# Load Tokenizer & Model
|
10 |
hub_location = 'cardiffnlp/twitter-roberta-base-sentiment'
|