Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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()
|