Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,13 +11,13 @@ summarizer = pipeline(task="summarization",
|
|
| 11 |
# name of the function
|
| 12 |
def summary(text, min_len,max_len):
|
| 13 |
summary = summarizer(text,min_length=min_len,max_length=max_len)
|
| 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 = [gr.Textbox(label="
|
| 22 |
|
| 23 |
demo.launch()
|
|
|
|
| 11 |
# name of the function
|
| 12 |
def summary(text, min_len,max_len):
|
| 13 |
summary = summarizer(text,min_length=min_len,max_length=max_len)
|
| 14 |
+
return summary[0]['summary_text']
|
| 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 = [gr.Textbox(label=" : Summarize Your Text : ", placeholder="Enter the text"), gr.Slider(minimum=4, maximum=10, step=1), gr.Slider(minimum=10, maximum=500, step=20),] , outputs="text",)
|
| 22 |
|
| 23 |
demo.launch()
|