Spaces:
Sleeping
Sleeping
abdulmatinomotoso
commited on
Commit
•
d886294
1
Parent(s):
3f27f6d
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import torch
|
|
7 |
|
8 |
target_list = ["Playful", "Infuriating", "Sentimental", "Cynical", "Depressing", "Awe-inspiring", "Patriotic", "Begrudging", "Educational", "Hopeful",
|
9 |
"Sarcastic", "Disrespectful", "Disparaging"]
|
10 |
-
device = torch.device(
|
11 |
|
12 |
model_name = "valurank/finetuned-distilbert-multi-label-emotion"
|
13 |
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
|
|
7 |
|
8 |
target_list = ["Playful", "Infuriating", "Sentimental", "Cynical", "Depressing", "Awe-inspiring", "Patriotic", "Begrudging", "Educational", "Hopeful",
|
9 |
"Sarcastic", "Disrespectful", "Disparaging"]
|
10 |
+
device = torch.device('cuda' if torch.cuda.is_available() else 'CPU')
|
11 |
|
12 |
model_name = "valurank/finetuned-distilbert-multi-label-emotion"
|
13 |
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|