Master0fNone commited on
Commit
66564a6
·
verified ·
1 Parent(s): b6e9744

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -2,8 +2,11 @@
2
  import gradio as gr
3
  from transformers import pipeline
4
 
5
- # Create a summarization pipeline
6
- summarizer = pipeline("summarization")
 
 
 
7
 
8
  # Define a function that takes a text and returns a summary
9
  def summarize(text):
 
2
  import gradio as gr
3
  from transformers import pipeline
4
 
5
+ # Import a specific model
6
+ model_name = "facebook/bart-large-cnn"
7
+
8
+ # Create a summarization pipeline with Facebook Bart
9
+ summarizer = pipeline("summarization", model=model_name)
10
 
11
  # Define a function that takes a text and returns a summary
12
  def summarize(text):