Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,20 +27,16 @@ def my_paraphrase(sentence):
|
|
| 27 |
|
| 28 |
return(output)
|
| 29 |
|
| 30 |
-
def text(
|
| 31 |
-
|
| 32 |
-
article.download()
|
| 33 |
-
article.parse()
|
| 34 |
-
|
| 35 |
-
input_text = article.text
|
| 36 |
output = " ".join([my_paraphrase(sent) for sent in sent_tokenize(input_text)])
|
| 37 |
|
| 38 |
return output
|
| 39 |
|
| 40 |
import gradio as gr
|
| 41 |
-
def summarize(
|
| 42 |
|
| 43 |
-
outputtext = text(
|
| 44 |
return outputtext
|
| 45 |
gr.Interface(fn=summarize, inputs=gr.inputs.Textbox(lines=7, placeholder="Enter text here"), outputs=[gr.outputs.Textbox(label="Paraphrased Text")],examples=[["developed by python team"
|
| 46 |
]]).launch(inline=False)
|
|
|
|
| 27 |
|
| 28 |
return(output)
|
| 29 |
|
| 30 |
+
def text(input_text):
|
| 31 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
output = " ".join([my_paraphrase(sent) for sent in sent_tokenize(input_text)])
|
| 33 |
|
| 34 |
return output
|
| 35 |
|
| 36 |
import gradio as gr
|
| 37 |
+
def summarize(input_text):
|
| 38 |
|
| 39 |
+
outputtext = text(input_text)
|
| 40 |
return outputtext
|
| 41 |
gr.Interface(fn=summarize, inputs=gr.inputs.Textbox(lines=7, placeholder="Enter text here"), outputs=[gr.outputs.Textbox(label="Paraphrased Text")],examples=[["developed by python team"
|
| 42 |
]]).launch(inline=False)
|