s0urin commited on
Commit
507e0a5
·
verified ·
1 Parent(s): 7881983

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +32 -1
README.md CHANGED
@@ -6,4 +6,35 @@ language:
6
  base_model:
7
  - google-t5/t5-small
8
  pipeline_tag: summarization
9
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  base_model:
7
  - google-t5/t5-small
8
  pipeline_tag: summarization
9
+ ---
10
+
11
+
12
+ # AML Text Summarization T5 Model
13
+
14
+ This is a text summarization model based on the T5-Small architecture, developed as part of the Advanced Machine Learning course at the University of Bremen.
15
+
16
+ ## Model Description
17
+
18
+ This model is fine-tuned on the CNN/Daily Mail dataset for abstractive text summarization. It uses the T5-Small (Text-To-Text Transfer Transformer) architecture.
19
+
20
+ ## Usage
21
+
22
+ ```
23
+ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
24
+
25
+ tokenizer = AutoTokenizer.from_pretrained("s0urin/aml-text-summarization-t5")
26
+ model = AutoModelForSeq2SeqLM.from_pretrained("s0urin/aml-text-summarization-t5")
27
+
28
+ text = "Your long text here..."
29
+ inputs = tokenizer("summarize: " + text, return_tensors="pt", max_length=512, truncation=True)
30
+ outputs = model.generate(inputs.input_ids, max_length=150, min_length=40, length_penalty=2.0, num_beams=4, early_stopping=True)
31
+ summary = tokenizer.decode(outputs, skip_special_tokens=True)
32
+
33
+ print(summary)
34
+ ```
35
+
36
+
37
+ ## Authors
38
+
39
+ - Sourin Kumar Pal
40
+ - Jassim Hameed Ayobkhan