abdulsamad commited on
Commit
cf4d49a
·
verified ·
1 Parent(s): 21b57f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -9,15 +9,15 @@ summarizer = pipeline(task="summarization",
9
 
10
 
11
  # name of the function
12
- def summary(text):
13
- summary = summarizer(text,min_length=10,max_length=100)
14
  return summary
15
 
16
 
17
  # We instantiate the Textbox class
18
- textbox = gr.Textbox(label="Summarizer: ", placeholder="Enter the text")
19
 
20
 
21
- demo = gr.Interface(fn=summary, inputs=textbox, outputs="text")
22
 
23
  demo.launch()
 
9
 
10
 
11
  # name of the function
12
+ def summary(text, min_len):
13
+ summary = summarizer(text,min_length=min_len,max_length=100)
14
  return summary
15
 
16
 
17
  # We instantiate the Textbox class
18
+ #textbox = gr.Textbox(label="Summarizer: ", placeholder="Enter the text")
19
 
20
 
21
+ demo = gr.Interface(fn=summary, [gr.Textbox(label="Summarizer: ", placeholder="Enter the text"), gr.Slider(minimum=4, maximum=6, step=1)] , outputs="text")
22
 
23
  demo.launch()