Spaces:
Runtime error
Runtime error
Commit
·
0557990
1
Parent(s):
17256a2
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import torch
|
|
6 |
|
7 |
|
8 |
tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
|
9 |
-
Model = EncoderDecoderModel.from_pretrained('Bert2BertForTextDescrambling')
|
10 |
def descramble(prompt):
|
11 |
input = tokenizer(prompt,return_tensors='pt')
|
12 |
input_id = input.input_ids
|
@@ -17,7 +17,7 @@ def descramble(prompt):
|
|
17 |
return gr.Textbox.update(value=output)
|
18 |
|
19 |
def set_example(example):
|
20 |
-
|
21 |
|
22 |
demo = gr.Blocks()
|
23 |
with demo:
|
|
|
6 |
|
7 |
|
8 |
tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
|
9 |
+
Model = EncoderDecoderModel.from_pretrained('damilojohn/Bert2BertForTextDescrambling')
|
10 |
def descramble(prompt):
|
11 |
input = tokenizer(prompt,return_tensors='pt')
|
12 |
input_id = input.input_ids
|
|
|
17 |
return gr.Textbox.update(value=output)
|
18 |
|
19 |
def set_example(example):
|
20 |
+
return gr.TextArea.update(value=example[0])
|
21 |
|
22 |
demo = gr.Blocks()
|
23 |
with demo:
|