ashishkat commited on
Commit
82d79a5
·
1 Parent(s): 10b7809

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -7
README.md CHANGED
@@ -1,21 +1,16 @@
1
- '''
2
- #### encode the input paragraph to summarize
3
  tokenized_text = tokenizer.encode_plus(
4
  str(text_input),
5
  return_attention_mask = True,
6
  return_tensors="pt")
7
 
8
- #### summarize the paragraph
9
-
10
  generated_token = model.generate(
11
  input_ids = tokenized_text["input_ids"],
12
  attention_mask=tokenized_text["attention_mask"],
13
  max_length = 256,
14
  use_cache=True,
15
  )
16
- #### decode the token
17
  summarized_paragraph = [
18
  tokenizer.decode(token_ids=ids, skip_special_tokens=True) for ids in generated_token
19
  ]
20
-
21
- '''
 
1
+ """
 
2
  tokenized_text = tokenizer.encode_plus(
3
  str(text_input),
4
  return_attention_mask = True,
5
  return_tensors="pt")
6
 
 
 
7
  generated_token = model.generate(
8
  input_ids = tokenized_text["input_ids"],
9
  attention_mask=tokenized_text["attention_mask"],
10
  max_length = 256,
11
  use_cache=True,
12
  )
 
13
  summarized_paragraph = [
14
  tokenizer.decode(token_ids=ids, skip_special_tokens=True) for ids in generated_token
15
  ]
16
+ """