Mr-Vicky-01's picture
Update README.md
cf218a2 verified
metadata
license: mit
pipeline_tag: summarization
widget:
  - text: >-
      Now, there is no doubt that one of the most important aspects of any Pixel
      phone is its camera. And there might be good news for all camera lovers.
      Rumours have suggested that the Pixel 9 could come with a telephoto lens,
      improving its photography capabilities even further. Google will likely
      continue to focus on using AI to enhance its camera performance, in order
      to make sure that Pixel phones remain top contenders in the world of
      mobile photography.
  - text: >-
      Elon Reeve Musk (/ˈiːlɒn/ EE-lon; born June 28, 1971) is a businessman and
      investor. He is the founder, chairman, CEO, and CTO of SpaceX; angel
      investor, CEO, product architect, and former chairman of Tesla, Inc.;
      owner, executive chairman, and CTO of X Corp.; founder of the Boring
      Company and xAI; co-founder  of Neuralink and OpenAI; and president of the
      Musk Foundation. He is one of the wealthiest people in  the world, with an
      estimated net worth of US$190 billion as of March 2024, according to the
      Bloomberg  Billionaires Index, and $195 billion according to Forbes,
      primarily from his ownership stakes in Tesla and SpaceX.[5][6]

      A member of the wealthy South African Musk family, Elon was born in
      Pretoria and briefly attended the  University of Pretoria before
      immigrating to Canada at age 18, acquiring citizenship through his 
      Canadian-born mother. Two years later, he matriculated at Queen University
      at Kingston in Canada. Musk later transferred to the University of
      Pennsylvania, and received bachelor degrees in economics and physics. He
      moved to California in 1995 to attend Stanford University, but dropped out
      after two  days and, with his brother Kimbal, co-founded online city guide
      software company Zip2. The startup was acquired by Compaq for $307 million
      in 1999, and that same year Musk co-founded X.com, a direct bank. X.com
      merged with Confinity in 2000 to form PayPal.

      In October 2002, eBay acquired PayPal for $1.5 billion, and that same
      year, with $100 million of the  money he made, Musk founded SpaceX, a
      spaceflight services company. In 2004, he became an early investor in
      electric vehicle manufacturer Tesla Motors, Inc. (now Tesla, Inc.). He
      became its chairman and product architect, assuming the position of CEO in
      2008. In 2006, Musk helped create SolarCity, a solar-energy company that
      was acquired by Tesla in 2016 and became Tesla Energy. In 2013, he
      proposed a hyperloop  high-speed vactrain transportation system. In 2015,
      he co-founded OpenAI, a nonprofit artificial intelligence research
      company. The following year, Musk co-founded Neuralink—a neurotechnology
      company  developing brain–computer interfaces—and the Boring Company, a
      tunnel construction company. In 2022, he acquired Twitter for $44 billion.
      He subsequently merged the company into newly created X Corp. and
      rebranded the service as X the following year. In March 2023, he founded
      xAI, an artificial  intelligence company.

      Musk has expressed views that have made him a polarizing figure.[7] He has
      been criticized for making unscientific and misleading statements,
      including COVID-19 misinformation and antisemitic conspiracy
      theories.[7][8][9][10] His ownership of Twitter has been similarly
      controversial, being marked by the  laying off of a large number of
      employees, an increase in hate speech and misinformation and
      disinformation on the website, as well as changes to Twitter Blue
      verification. In 2018, the U.S. Securities and Exchange Commission (SEC)
      sued him, alleging that he had falsely announced that he had secured
      funding for a private takeover of Tesla. To settle the case, Musk stepped
      down as the chairman of Tesla and paid a $20 million fine.
  - text: >-
      OnePlus faces the prospect of going out of store in some states in the
      Indian market next month. Reports  this week suggest OnePlus phones will
      be taken off around 4,500 stores in different parts of the country from
      May 1, 2024 onwards. It has been pointed out that the retailer
      organisation taking charge of stores  in the South and western parts of
      the country are not pleased with the company for various reasons.

      The South Indian Organized Retailers Association (ORA) has been quoted
      saying that OnePlus does not garner enough margins for its network to sell
      OnePlus phones and that will definitely come as a big jolt to the popular
      brand.

      Report also mentions that the ORA has sent a formal complaint to OnePlus
      executives earlier this week, stating that until the issues regarding
      OnePlus warranty and margins are not resolved, retailers will  decide
      against selling OnePlus phones at their stores in states like Gujarat,
      Maharashtra, Andhra Pradesh, Telangana, Karnataka, and Tamil Nadu, that
      caters to a total of 4,500 stores.

      Having said that, the retailers looking to stop selling OnePlus phones are
      associated with multi-retail brands, so it is possible that small-time
      mobile shops could still offer phones from the brand. OnePlus has claimed
      to be one of the top-sellers via online channels but its focus on the
      offline market seems  to have wavered which seems to have caused this
      displeasure among the retailers in the country.

      We have previously seen that offline retailers play a big role in the
      growth and demand for phones, and OnePlus will need to do everything to
      make sure this issue is resolved at the earliest, before it starts  to
      impact its online sales as well. We’re still a few weeks away from the
      deadline, which ensures OnePlus can still get things sorted and go back to
      business as usual in these regions.
datasets:
  - EdinburghNLP/xsum
  - samsum
language:
  - en
library_name: transformers

Model Description

This model is based on the Facebook BART (Bidirectional and Auto-Regressive Transformers) architecture, specifically the large variant fine-tuned for text summarization tasks. BART is a sequence-to-sequence model introduced by Facebook AI, capable of handling various natural language processing tasks, including summarization.

image/png

Model Details:

  • Architecture: BART Large CNN
  • Pre-trained model: BART Large
  • Fine-tuned for: Text Summarization
  • Fine-tuning dataset: xsum & samsum

Space Link:

Summarization Model

How To FineTune This Model:

Github

Usage:

Installation:

You can install the necessary libraries using pip:

pip install transformers

Inferecnce

provided a simple snippet of how to use this model for the task of paragraph summarization in PyTorch.

from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

tokenizer = AutoTokenizer.from_pretrained("Mr-Vicky-01/Bart-Finetuned-conversational-summarization")
model = AutoModelForSeq2SeqLM.from_pretrained("Mr-Vicky-01/Bart-Finetuned-conversational-summarization")

def generate_summary(text):
    inputs = tokenizer([text], max_length=1024, return_tensors='pt', truncation=True)
    summary_ids = model.generate(inputs['input_ids'], max_new_tokens=100, do_sample=False)
    summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
    return summary

text_to_summarize = """Now, there is no doubt that one of the most important aspects of any Pixel phone is its camera.
And there might be good news for all camera lovers. Rumours have suggested that the Pixel 9 could come with a telephoto lens,
improving its photography capabilities even further. Google will likely continue to focus on using AI to enhance its camera performance,
in order to make sure that Pixel phones remain top contenders in the world of mobile photography."""
summary = generate_summary(text_to_summarize)

print(summary)
Google is rumoured to be about to unveil its next-generation Pixel smartphone,
the Google Pixel 9,which is expected to come with a telephoto lens and an artificial intelligence (AI)
system to improve its camera capabilities, as well as improve the quality of its images.

Training Parameters

num_train_epochs=1,
warmup_steps = 500,
per_device_train_batch_size=4,
per_device_eval_batch_size=4,
weight_decay = 0.01,
gradient_accumulation_steps=16