Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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=
|
| 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,
|
| 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()
|