achimoraites
commited on
Commit
•
1e60344
1
Parent(s):
38b73e2
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ from transformers import pipeline
|
|
7 |
summarizer = pipeline("summarization", model="achimoraites/flan-t5-base-samsum")
|
8 |
|
9 |
def summarize(text):
|
10 |
-
return summarizer(text, max_length=
|
11 |
|
12 |
iface = gr.Interface(fn=summarize, inputs="text", outputs="text", live=False, capture_session=True)
|
13 |
iface.launch(inline = False)
|
|
|
7 |
summarizer = pipeline("summarization", model="achimoraites/flan-t5-base-samsum")
|
8 |
|
9 |
def summarize(text):
|
10 |
+
return summarizer(text, max_length=512, min_length=30)[0]['summary_text']
|
11 |
|
12 |
iface = gr.Interface(fn=summarize, inputs="text", outputs="text", live=False, capture_session=True)
|
13 |
iface.launch(inline = False)
|