Spaces:
Runtime error
Runtime error
Commit
·
dddb6a3
1
Parent(s):
36cb189
Update app.py
Browse files
app.py
CHANGED
@@ -6,11 +6,11 @@ model = BertModel.from_pretrained("bert-large-uncased")
|
|
6 |
unmasker = pipeline('fill-mask', model=model, tokenizer=tokenizer)
|
7 |
|
8 |
def fill_mask(sentence):
|
9 |
-
|
10 |
-
results = unmasker(masked_sentence)
|
11 |
return [result['sequence'] for result in results]
|
12 |
|
13 |
inputs = gr.inputs.Textbox(label="Enter a sentence with a masked word")
|
14 |
outputs = gr.outputs.Textbox(label="Predicted sequences")
|
15 |
|
16 |
gr.Interface(fn=fill_mask, inputs=inputs, outputs=outputs).launch()
|
|
|
|
6 |
unmasker = pipeline('fill-mask', model=model, tokenizer=tokenizer)
|
7 |
|
8 |
def fill_mask(sentence):
|
9 |
+
results = unmasker(sentence)
|
|
|
10 |
return [result['sequence'] for result in results]
|
11 |
|
12 |
inputs = gr.inputs.Textbox(label="Enter a sentence with a masked word")
|
13 |
outputs = gr.outputs.Textbox(label="Predicted sequences")
|
14 |
|
15 |
gr.Interface(fn=fill_mask, inputs=inputs, outputs=outputs).launch()
|
16 |
+
|