SJ-Ray commited on
Commit
4585909
·
1 Parent(s): dd5a4b9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -0
README.md CHANGED
@@ -14,11 +14,14 @@ DialogSum dataset (115056 Records) was used to fine-tune the model for Punctuati
14
  <pre>
15
 
16
  from transformers import T5Tokenizer, TFT5ForConditionalGeneration
 
17
  tokenizer = T5Tokenizer.from_pretrained('SJ-Ray/Re-Punctuate')
18
  model = TFT5ForConditionalGeneration.from_pretrained('SJ-Ray/Re-Punctuate')
 
19
  input_text = 'the story of this brave brilliant athlete whose very being was questioned so publicly is one that still captures the imagination'
20
  inputs = tokenizer.encode("punctuate: " + input_text, return_tensors="tf")
21
  result = model.generate(inputs)
 
22
  decoded_output = tokenizer.decode(result[0], skip_special_tokens=True)
23
  print(decoded_output)
24
 
@@ -26,3 +29,8 @@ print(decoded_output)
26
  <h4> Example: </h4>
27
  <b>Input:</b> the story of this brave brilliant athlete whose very being was questioned so publicly is one that still captures the imagination <br>
28
  <b>Output:</b> The story of this brave, brilliant athlete, whose very being was questioned so publicly, is one that still captures the imagination.
 
 
 
 
 
 
14
  <pre>
15
 
16
  from transformers import T5Tokenizer, TFT5ForConditionalGeneration
17
+
18
  tokenizer = T5Tokenizer.from_pretrained('SJ-Ray/Re-Punctuate')
19
  model = TFT5ForConditionalGeneration.from_pretrained('SJ-Ray/Re-Punctuate')
20
+
21
  input_text = 'the story of this brave brilliant athlete whose very being was questioned so publicly is one that still captures the imagination'
22
  inputs = tokenizer.encode("punctuate: " + input_text, return_tensors="tf")
23
  result = model.generate(inputs)
24
+
25
  decoded_output = tokenizer.decode(result[0], skip_special_tokens=True)
26
  print(decoded_output)
27
 
 
29
  <h4> Example: </h4>
30
  <b>Input:</b> the story of this brave brilliant athlete whose very being was questioned so publicly is one that still captures the imagination <br>
31
  <b>Output:</b> The story of this brave, brilliant athlete, whose very being was questioned so publicly, is one that still captures the imagination.
32
+
33
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
34
+
35
+ <h4> Connect on: </h4>
36
+ <a href='www.linkedin.com/in/suraj-kumar-710382a7'> <i class="fa fa-linkedin-square" style="font-size:36px;color:#0e76a8"></i></a>