Spaces:
Runtime error
Runtime error
Downloading models
Browse files
app.py
CHANGED
@@ -4,21 +4,13 @@ from transformers import pipeline
|
|
4 |
import gc
|
5 |
|
6 |
# Download models
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
|
11 |
def fill_mask(stmt,model):
|
12 |
if model == 'bert':
|
13 |
-
|
14 |
-
original = 'bert-base-uncased'
|
15 |
-
|
16 |
-
|
17 |
-
unmasker_1 = pipeline('fill-mask', model=debiased)
|
18 |
-
|
19 |
-
unmasker_2 = pipeline('fill-mask', model=original)
|
20 |
-
|
21 |
-
return unmasker_1(stmt), unmasker_2(stmt)
|
22 |
|
23 |
|
24 |
demo = gr.Interface(
|
|
|
4 |
import gc
|
5 |
|
6 |
# Download models
|
7 |
+
bert_debiased = pipeline('fill-mask', model='Daniel-Saeedi/Sent-Debias-bert-gender-debiased')
|
8 |
+
bert_original = pipeline('fill-mask', model='Daniel-Saeedi/Sent-Debias-bert-gender-debiased')
|
9 |
+
|
10 |
|
11 |
def fill_mask(stmt,model):
|
12 |
if model == 'bert':
|
13 |
+
return bert_debiased(stmt), bert_original(stmt)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
|
16 |
demo = gr.Interface(
|