s2049 commited on
Commit
fad50d4
·
verified ·
1 Parent(s): b7d2c22

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -4
app.py CHANGED
@@ -14,13 +14,24 @@ def summarize_text(text):
14
  with gr.Blocks() as demo:
15
  gr.Markdown("## Text Summarization Demo")
16
  with gr.Row():
17
- input_text = gr.Textbox(label="Enter your text here", placeholder="Paste your text here...", lines=5)
 
 
 
 
18
  with gr.Row():
19
  summarize_button = gr.Button("Summarize", variant="primary")
20
  with gr.Row():
21
- output_text = gr.Textbox(label="Summary", lines=4)
 
 
 
22
 
23
- summarize_button.click(fn=summarize_text, inputs=input_text, outputs=output_text)
 
 
 
 
24
 
25
  if __name__ == "__main__":
26
- demo.launch(share=True)
 
14
  with gr.Blocks() as demo:
15
  gr.Markdown("## Text Summarization Demo")
16
  with gr.Row():
17
+ input_text = gr.Textbox(
18
+ label="Enter your text here",
19
+ placeholder="Paste your text here...",
20
+ lines=5
21
+ )
22
  with gr.Row():
23
  summarize_button = gr.Button("Summarize", variant="primary")
24
  with gr.Row():
25
+ output_text = gr.Textbox(
26
+ label="Summary",
27
+ lines=4
28
+ )
29
 
30
+ summarize_button.click(
31
+ fn=summarize_text,
32
+ inputs=input_text,
33
+ outputs=output_text
34
+ )
35
 
36
  if __name__ == "__main__":
37
+ demo.launch()