Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,7 @@ summarizer = pipeline("summarization", model=model_name,device='cuda')
|
|
| 7 |
|
| 8 |
@spaces.GPU(duration=120)
|
| 9 |
def summarize(text):
|
| 10 |
-
summary = summarizer(text, max_length=
|
| 11 |
return summary
|
| 12 |
|
| 13 |
gr.Interface(fn=summarize, inputs=gr.Textbox(lines=7, label="Input Text"), outputs="text").launch(inline=False)
|
|
|
|
| 7 |
|
| 8 |
@spaces.GPU(duration=120)
|
| 9 |
def summarize(text):
|
| 10 |
+
summary = summarizer(text, max_length=1024, min_length=30, do_sample=False)[0]['summary_text']
|
| 11 |
return summary
|
| 12 |
|
| 13 |
gr.Interface(fn=summarize, inputs=gr.Textbox(lines=7, label="Input Text"), outputs="text").launch(inline=False)
|