Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ summarizer = pipeline(
|
|
7 |
'pszemraj/led-large-book-summary'
|
8 |
)
|
9 |
|
10 |
-
def
|
11 |
result = summarizer(text)
|
12 |
return result[0]["summary_text"]
|
13 |
|
@@ -16,5 +16,5 @@ with gr.Blocks() as demo:
|
|
16 |
text = gr.Textbox(label="Text Input", placeholder="Enter your text......")
|
17 |
submit_btn = gr.Button("Summarize")
|
18 |
summary = gr.Textbox(label="Summary")
|
19 |
-
submit_btn.click(fn=
|
20 |
demo.launch()
|
|
|
7 |
'pszemraj/led-large-book-summary'
|
8 |
)
|
9 |
|
10 |
+
def summarize_text(text):
|
11 |
result = summarizer(text)
|
12 |
return result[0]["summary_text"]
|
13 |
|
|
|
16 |
text = gr.Textbox(label="Text Input", placeholder="Enter your text......")
|
17 |
submit_btn = gr.Button("Summarize")
|
18 |
summary = gr.Textbox(label="Summary")
|
19 |
+
submit_btn.click(fn=summarize_text, inputs=text, outputs=summary)
|
20 |
demo.launch()
|