Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,8 +8,8 @@ import torch
|
|
8 |
tokenizer = T5Tokenizer.from_pretrained("UBC-NLP/araT5-base")
|
9 |
model = T5ForConditionalGeneration.from_pretrained("UBC-NLP/araT5-base")
|
10 |
|
11 |
-
# Emotion classification pipeline
|
12 |
-
emotion_classifier = pipeline("text-classification", model="
|
13 |
|
14 |
# Function to get embeddings from ARAT5 for topic modeling
|
15 |
def generate_embeddings(texts):
|
|
|
8 |
tokenizer = T5Tokenizer.from_pretrained("UBC-NLP/araT5-base")
|
9 |
model = T5ForConditionalGeneration.from_pretrained("UBC-NLP/araT5-base")
|
10 |
|
11 |
+
# Emotion classification pipeline (updated model for Arabic emotion classification)
|
12 |
+
emotion_classifier = pipeline("text-classification", model="aubmindlab/bert-base-arabertv2")
|
13 |
|
14 |
# Function to get embeddings from ARAT5 for topic modeling
|
15 |
def generate_embeddings(texts):
|