damilojohn commited on
Commit
56cd8ba
·
1 Parent(s): fbd88a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -6,7 +6,7 @@ import torch
6
 
7
 
8
  tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
9
- Model = EncoderDecoderModel.from_pretrained('/content/drive/MyDrive/Models/Bert2BertForDescrambling')
10
  def descramble(prompt):
11
  input = tokenizer(prompt,return_tensors='pt')
12
  input_id = input.input_ids
@@ -16,8 +16,8 @@ def descramble(prompt):
16
  output = tokenizer.decode(output[0],skip_special_tokens=True)
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:
@@ -64,4 +64,4 @@ with demo:
64
 
65
 
66
 
67
- demo.launch(debug=True)
 
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
 
16
  output = tokenizer.decode(output[0],skip_special_tokens=True)
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:
 
64
 
65
 
66
 
67
+ demo.launch()