helliun commited on
Commit
03fb974
1 Parent(s): 034f666

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
2
  from transformers import pipeline
3
  def summarize(data):
4
  summarizer = pipeline("summarization", model="helliun/bart-lyrics-description")
5
- output = summarizer(data[:1000], max_length=300, min_length=30, do_sample=False)
6
  return output[0]["summary_text"]
7
  demo = gr.Interface(fn=summarize,inputs=gr.components.Textbox(label="Song Lyrics"),outputs=["text"],title="Song Describer")
8
  demo.launch()
 
2
  from transformers import pipeline
3
  def summarize(data):
4
  summarizer = pipeline("summarization", model="helliun/bart-lyrics-description")
5
+ output = summarizer("text: "+data[:1000], max_length=300, min_length=30, do_sample=False)
6
  return output[0]["summary_text"]
7
  demo = gr.Interface(fn=summarize,inputs=gr.components.Textbox(label="Song Lyrics"),outputs=["text"],title="Song Describer")
8
  demo.launch()