Spaces:
Sleeping
Sleeping
Delete README.md
Browse fileswrong readme uploaded
README.md
DELETED
|
@@ -1,104 +0,0 @@
|
|
| 1 |
-
|
| 2 |
-
# 📰 Hindi News Summarizer using IndicBART
|
| 3 |
-
|
| 4 |
-
This is a fine-tuned version of [`ai4bharat/IndicBART`](https://huggingface.co/ai4bharat/IndicBART) trained on the **Hindi ILSUM 2024 dataset** for abstractive summarization of Hindi news articles.
|
| 5 |
-
|
| 6 |
-
---
|
| 7 |
-
|
| 8 |
-
## ✨ Model Details
|
| 9 |
-
|
| 10 |
-
- **Model**: `ai4bharat/IndicBART` (multilingual BART)
|
| 11 |
-
- **Fine-tuned on**: Hindi subset of ILSUM 2024
|
| 12 |
-
- **Task**: Abstractive summarization
|
| 13 |
-
- **Language**: Hindi (`hi`)
|
| 14 |
-
- **Max input length**: 512 tokens
|
| 15 |
-
- **Max summary length**: 128 tokens
|
| 16 |
-
|
| 17 |
-
---
|
| 18 |
-
|
| 19 |
-
## 🧾 Dataset
|
| 20 |
-
|
| 21 |
-
- **Name**: ILSUM 2024 (Indic Language Summarization Dataset)
|
| 22 |
-
- **Source**: Hindi news articles with corresponding abstractive summaries
|
| 23 |
-
- **Size**:
|
| 24 |
-
- Training samples: ~11K
|
| 25 |
-
- Validation samples: ~1.6K
|
| 26 |
-
|
| 27 |
-
---
|
| 28 |
-
|
| 29 |
-
## 🚀 How to Use
|
| 30 |
-
|
| 31 |
-
### 🐍 In Python (Transformers)
|
| 32 |
-
|
| 33 |
-
```python
|
| 34 |
-
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
| 35 |
-
|
| 36 |
-
model = AutoModelForSeq2SeqLM.from_pretrained("Adarsh921/indicbart-hindi-summarizer")
|
| 37 |
-
tokenizer = AutoTokenizer.from_pretrained("Adarsh921/indicbart-hindi-summarizer")
|
| 38 |
-
|
| 39 |
-
text = "हिंदुस्तान में मानसून ने दस्तक दे दी है और कई इलाकों में भारी बारिश हो रही है..."
|
| 40 |
-
inputs = tokenizer(text, return_tensors="pt", max_length=512, truncation=True)
|
| 41 |
-
|
| 42 |
-
summary_ids = model.generate(
|
| 43 |
-
inputs["input_ids"],
|
| 44 |
-
max_length=128,
|
| 45 |
-
num_beams=4,
|
| 46 |
-
no_repeat_ngram_size=3,
|
| 47 |
-
early_stopping=True
|
| 48 |
-
)
|
| 49 |
-
|
| 50 |
-
summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
|
| 51 |
-
print(summary)
|
| 52 |
-
```
|
| 53 |
-
|
| 54 |
-
---
|
| 55 |
-
|
| 56 |
-
## 💡 Example
|
| 57 |
-
|
| 58 |
-
**Input Article**:
|
| 59 |
-
|
| 60 |
-
```
|
| 61 |
-
भारतीय क्रिकेट टीम ने इंग्लैंड के खिलाफ रोमांचक मुकाबले में 5 रन से जीत दर्ज की है...
|
| 62 |
-
```
|
| 63 |
-
|
| 64 |
-
**Generated Summary**:
|
| 65 |
-
|
| 66 |
-
```
|
| 67 |
-
भारत ने इंग्लैंड को 5 रन से हराया।
|
| 68 |
-
```
|
| 69 |
-
|
| 70 |
-
---
|
| 71 |
-
|
| 72 |
-
## 📊 Evaluation
|
| 73 |
-
|
| 74 |
-
| Metric | Score (approx.) |
|
| 75 |
-
|----------|-----------------|
|
| 76 |
-
| ROUGE-1 | 0.50 |
|
| 77 |
-
| ROUGE-2 | 0.21 |
|
| 78 |
-
| ROUGE-L | 0.50 |
|
| 79 |
-
|
| 80 |
-
Model trained with:
|
| 81 |
-
- Batch size: 8
|
| 82 |
-
- Epochs: 6
|
| 83 |
-
- Optimizer: AdamW
|
| 84 |
-
- Learning rate: 3e-5
|
| 85 |
-
|
| 86 |
-
---
|
| 87 |
-
|
| 88 |
-
## 🌐 Live Demo
|
| 89 |
-
|
| 90 |
-
Try the model in a live Gradio interface:
|
| 91 |
-
👉 [Hindi Summarizer Space](https://huggingface.co/spaces/Adarsh921/indicbart-hindi-summarizer)
|
| 92 |
-
|
| 93 |
-
---
|
| 94 |
-
|
| 95 |
-
## 🧠 Author
|
| 96 |
-
|
| 97 |
-
Developed by **Adarsh Bhardwaj**
|
| 98 |
-
[Hugging Face Profile](https://huggingface.co/Adarsh921)
|
| 99 |
-
|
| 100 |
-
---
|
| 101 |
-
|
| 102 |
-
## 📌 License
|
| 103 |
-
|
| 104 |
-
MIT License
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|