Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from newspaper import Article
|
2 |
+
|
3 |
+
def read_later(url):
|
4 |
+
article = Article(url)
|
5 |
+
article.download()
|
6 |
+
article.parse()
|
7 |
+
return article.text
|
8 |
+
|
9 |
+
app = gr.Interface(fn=read_later, inputs=gr.inputs.Textbox(placeholder="Enter URL"), outputs=gr.outputs.Text)
|
10 |
+
app.launch()
|