transformers safetensors mbart text2text-generation license:apache-2.0 autotrain_compatible endpoints_compatible region:us
---
license: apache-2.0
widget:
- text: पश्चिम नेपालमा भारी वर्षाले धेरै पहिरो निम्त्याएको छ, जसले पूर्वाधार र घरहरूमा
    ठूलो क्षति पुर्याएको छ। कम्तिमा पाँच जना हराइरहेका छन् र उद्धार कार्य जारी छ।
    अधिकारीहरूले प्रभावित क्षेत्रका बासिन्दाहरूलाई सतर्क रहन र सुरक्षात्मक दिशानिर्देशहरू
    पालना गर्न चेतावनी दिएका छन्।
---
language: 
  - ne_NP
tags:
  - summarization
  - ne_NP
license: apache-2.0
datasets:
  - sanjeev-bhandari01/nepali-summarization-dataset

metrics:
  - rouge


model_name: "MBart Nepali Summarization Model"
model_description: >
  This model is a fine-tuned version of the `facebook/mbart-large-cc25` on the Nepali Summarization Dataset. It is designed to generate concise summaries of Nepali articles.
  
intended_use: >
  The model is intended for use in summarizing Nepali news articles or other textual content written in Nepali. It can be utilized in applications such as news aggregation, content summarization, and aiding in quick information retrieval.

how_to_use: |
  To use this model, you can load it with the `transformers` library as follows:
  
  ```python
  from transformers import MBartTokenizer, MBartForConditionalGeneration
  
  model_name = 'path_to_your_finetuned_model'
  tokenizer = MBartTokenizer.from_pretrained(model_name)
  model = MBartForConditionalGeneration.from_pretrained(model_name)
  
  # Example text
  article = "तपाईंको नेपाली समाचार लेख यहाँ राख्नुहोस्।"
  
  # Tokenize the input
  inputs = tokenizer(article, return_tensors="pt", max_length=1024, truncation=True)
  
  # Generate summary
  summary_ids = model.generate(inputs['input_ids'], max_length=128, num_beams=4, early_stopping=True)
  summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
  
  print(summary)
