Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
-
from newspaper import Article
|
2 |
-
|
3 |
import gradio as gr
|
|
|
4 |
|
5 |
def read_later(url):
|
6 |
article = Article(url)
|
@@ -8,5 +7,8 @@ def read_later(url):
|
|
8 |
article.parse()
|
9 |
return article.text
|
10 |
|
11 |
-
|
|
|
|
|
|
|
12 |
app.launch()
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
+
from newspaper import Article
|
3 |
|
4 |
def read_later(url):
|
5 |
article = Article(url)
|
|
|
7 |
article.parse()
|
8 |
return article.text
|
9 |
|
10 |
+
inputs = gr.components.Textbox(placeholder="Enter URL")
|
11 |
+
outputs = gr.components.Text()
|
12 |
+
|
13 |
+
app = gr.Interface(fn=read_later, inputs=inputs, outputs=outputs)
|
14 |
app.launch()
|