| --- |
| language: en |
| library_name: transformers |
| pipeline_tag: summarization |
| tags: |
| - youtube |
| - comments |
| - summarization |
| datasets: |
| - sujayC66/text_summarization_512_length_1_4000 |
| metrics: |
| - rouge |
| base_model: |
| - Sivakkanth/youtube_comments_summarizer |
| --- |
| |
| # YouTube Comments Summarizer |
|
|
| This model is fine-tuned to summarize YouTube comments into a concise summary. |
| It is based on **T5** and can be used directly with the Hugging Face `transformers` pipeline. |
|
|
| --- |
|
|
| ## Usage Example |
|
|
| ```python |
| from transformers import pipeline |
| |
| # Load the summarization pipeline from Hugging Face |
| model_id = "Sivakkanth/youtube_comments_summarizer" |
| |
| summarizer = pipeline("summarization", model=model_id, tokenizer=model_id) |
| |
| # Sample YouTube comment text |
| comments_text = """ |
| This is a really interesting video about natural language processing. |
| I learned a lot about different techniques for text summarization. |
| The presenter explained everything clearly and the examples were helpful. |
| I would recommend this video to anyone interested in NLP. |
| """ |
| |
| # Generate summary |
| result = summarizer( |
| comments_text, |
| max_length=128, |
| min_length=30, |
| do_sample=False |
| ) |
| |
| print("Original Text:") |
| print(comments_text) |
| print("\nGenerated Summary:") |
| print(result[0]['summary_text']) |
| |
| |
| Input: |
| This is a really interesting video about natural language processing. |
| I learned a lot about different techniques for text summarization. |
| The presenter explained everything clearly and the examples were helpful. |
| I would recommend this video to anyone interested in NLP. |
| |
| |
| Output (example): |
| This video about NLP was very informative and clearly explained, with helpful examples. |
| |
| ## Eval Results |
| |
| Evaluation on a held-out YouTube comments test set: |
| |
| - **ROUGE-1:** 0.5676652376831697 |
| - **ROUGE-2:** 0.3758989832045812 |
| - **ROUGE-L:** 0.4824726190654699 |
| |