Fathi7ma commited on
Commit
006a087
·
verified ·
1 Parent(s): d2adb70

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +26 -31
README.md CHANGED
@@ -1,40 +1,35 @@
 
 
 
 
1
  ---
2
- library_name: transformers
3
- license: apache-2.0
4
- base_model: sshleifer/distilbart-cnn-12-6
5
- tags:
6
- - summarization
7
- - general-purpose
8
- - cpu-friendly
9
- - transformers
10
- metrics:
11
- - rouge
12
- model-index:
13
- - name: general_text_summarizer_cpu
14
- results:
15
- - task:
16
- name: Summarization
17
- type: summarization
18
- metrics:
19
- - name: Rouge1
20
- type: rouge
21
- value: 36.61
22
- - name: Rouge2
23
- type: rouge
24
- value: 16.51
25
- - name: Rougel
26
- type: rouge
27
- value: 26.24
28
  ---
29
 
30
- ## Model description
 
 
31
 
32
- general_text_summarizer_cpu is a lightweight text summarization model fine-tuned on a general-purpose English dataset.
33
- It is designed to generate concise and coherent summaries for articles, reports, blog posts, and other long-form text.
34
 
35
- This model is optimized for CPU usage and can run efficiently on MacBooks and other low-memory devices.
36
- It is based on a pre-trained T5 transformer, adapted for general summarization tasks.
 
 
 
37
 
 
 
 
38
  ## Intended uses
39
 
40
  This model can summarize:
 
1
+ # 🧠 General Text Summarizer
2
+
3
+ This model is a fine-tuned version of [sshleifer/distilbart-cnn-12-6](https://huggingface.co/sshleifer/distilbart-cnn-12-6), trained to generate **concise and fluent summaries** of general English text — including **news articles, essays, stories, and blog posts**.
4
+
5
  ---
6
+
7
+ ## 🚀 Model Description
8
+
9
+ - **Base model:** DistilBART (CNN/DailyMail)
10
+ - **Framework:** 🤗 Transformers (PyTorch)
11
+ - **Training goal:** Summarize text across multiple domains (not limited to one topic)
12
+ - **Device optimized:** CPU & Apple M-series chips (MPS compatible)
13
+
14
+ This model is suitable for lightweight summarization tasks on laptops or limited-resource machines.
15
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  ---
17
 
18
+ ## 🧾 Example Usage
19
+
20
+ from transformers import pipeline
21
 
22
+ summarizer = pipeline("summarization", model="Fathi7ma/general_text_summarizer_cpu")
 
23
 
24
+ text = """
25
+ Climate change continues to affect weather patterns across the globe.
26
+ Scientists warn that without immediate action, rising temperatures may lead
27
+ to irreversible damage to ecosystems and human livelihoods.
28
+ """
29
 
30
+ summary = summarizer(text, max_length=80, min_length=25, do_sample=False)
31
+ print(summary[0]['summary_text'])
32
+
33
  ## Intended uses
34
 
35
  This model can summarize: