imvladikon commited on
Commit
acaf167
1 Parent(s): 118bb1e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -9
README.md CHANGED
@@ -8,15 +8,10 @@ pipeline_tag: summarization
8
  from transformers import AutoModelForSeq2SeqLM, AutoTokenizer, SummarizationPipeline
9
 
10
 
11
- class HebrewSummarizationPipeline(SummarizationPipeline):
12
-
13
- @classmethod
14
- def from_pretrained(self, *args, **kwargs):
15
- model = AutoModelForSeq2SeqLM.from_pretrained(*args, **kwargs)
16
- tokenizer = AutoTokenizer.from_pretrained(*args, **kwargs)
17
- return self(model=model, tokenizer=tokenizer)
18
-
19
- summarizer = HebrewSummarizationPipeline.from_pretrained("imvladikon/het5_small_summarization")
20
  ```
21
 
22
  example
 
8
  from transformers import AutoModelForSeq2SeqLM, AutoTokenizer, SummarizationPipeline
9
 
10
 
11
+ model_name = "imvladikon/het5_small_summarization"
12
+ model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
13
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
14
+ summarizer = SummarizationPipeline(model=model, tokenizer=tokenizer)
 
 
 
 
 
15
  ```
16
 
17
  example