Spaces:
Sleeping
Sleeping
heisenberg3376
commited on
Commit
•
e98b406
1
Parent(s):
83a3904
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from transformers import pipeline
|
|
4 |
def reverse_text(text):
|
5 |
pipe = pipeline('summarization', model='heisenberg3376/bart-base-summarization')
|
6 |
|
7 |
-
return pipe(
|
8 |
|
9 |
# Create a Gradio interface
|
10 |
interface = gr.Interface(fn=reverse_text, inputs="text", outputs="text")
|
|
|
4 |
def reverse_text(text):
|
5 |
pipe = pipeline('summarization', model='heisenberg3376/bart-base-summarization')
|
6 |
|
7 |
+
return pipe(text)[0]['summary_text']
|
8 |
|
9 |
# Create a Gradio interface
|
10 |
interface = gr.Interface(fn=reverse_text, inputs="text", outputs="text")
|