Spaces:
Runtime error
Runtime error
Commit
·
dbd7e4b
1
Parent(s):
16c334c
Update 1
Browse files
app.py
CHANGED
@@ -9,8 +9,6 @@ from happytransformer import HappyTextToText, TTSettings
|
|
9 |
import torch
|
10 |
from torch.nn import BCEWithLogitsLoss
|
11 |
from torch.utils.data import DataLoader, TensorDataset, random_split
|
12 |
-
from happytransformer import HappyTextToText, TTSettings
|
13 |
-
|
14 |
|
15 |
pipe = pipeline("text-classification", model="saurabhg2083/model_bert")
|
16 |
happy_tt = HappyTextToText("T5", "vennify/t5-base-grammar-correction")
|
@@ -18,7 +16,6 @@ args = TTSettings(num_beams=5, min_length=1)
|
|
18 |
model = BertForSequenceClassification.from_pretrained(save_directory)
|
19 |
tokenizer = BertTokenizer.from_pretrained(save_directory)
|
20 |
|
21 |
-
|
22 |
gendered_pronouns = [
|
23 |
'ambition', 'driven', 'lead', 'persist', 'principle', 'decision', 'superior', 'individual', 'assertive',
|
24 |
'strong', 'hierarchical', 'rigid', 'silicon valley', 'stock options', 'takes risk', 'workforce', 'autonomous',
|
|
|
9 |
import torch
|
10 |
from torch.nn import BCEWithLogitsLoss
|
11 |
from torch.utils.data import DataLoader, TensorDataset, random_split
|
|
|
|
|
12 |
|
13 |
pipe = pipeline("text-classification", model="saurabhg2083/model_bert")
|
14 |
happy_tt = HappyTextToText("T5", "vennify/t5-base-grammar-correction")
|
|
|
16 |
model = BertForSequenceClassification.from_pretrained(save_directory)
|
17 |
tokenizer = BertTokenizer.from_pretrained(save_directory)
|
18 |
|
|
|
19 |
gendered_pronouns = [
|
20 |
'ambition', 'driven', 'lead', 'persist', 'principle', 'decision', 'superior', 'individual', 'assertive',
|
21 |
'strong', 'hierarchical', 'rigid', 'silicon valley', 'stock options', 'takes risk', 'workforce', 'autonomous',
|