Dannyar608 commited on
Commit
a82f821
·
verified ·
1 Parent(s): 414fbb0

Create README.md

Browse files

The code provided sets up a simple web-based interface for summarizing text using the facebook/bart-large-cnn model. It first installs the necessary Python libraries: transformers for using pre-trained models, and gradio for creating interactive demos. The pipeline function from transformers is then used to load the pre-trained BART model for summarization, which is specifically fine-tuned on the CNN/Daily Mail dataset for generating abstractive summaries. The function summarize_text takes an input text and uses the summarization pipeline to produce a summary, with the length of the summary constrained between 100 and 200 tokens. The do_sample=False parameter ensures deterministic results, meaning the summary is consistent with each run. Finally, a Gradio interface is created with an input textbox for users to enter their text and an output textbox to display the generated summary. The interface also includes a title and description to guide the user. When the user submits text, the model processes it and returns a concise summary, allowing anyone to interact with the model without needing to write code.

Files changed (1) hide show
  1. README.md +27 -0
README.md ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - abisee/cnn_dailymail
4
+ language:
5
+ - en
6
+ metrics:
7
+ - rouge
8
+ - bleu
9
+ - meteor
10
+ - ter
11
+ base_model:
12
+ - facebook/bart-large-cnn
13
+ pipeline_tag: summarization
14
+ library_name: transformers
15
+ tags:
16
+ - code
17
+ - Summarizer
18
+ - BART
19
+ - transformers
20
+ - Gradio
21
+ - Machine Learning
22
+ - Natural Language Processing (NLP)
23
+ - Deep Learning
24
+ - Interactive Demo
25
+ - Python
26
+ - AI
27
+ ---