Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from readability import Document
|
3 |
+
import requests
|
4 |
+
|
5 |
+
def read_later(url):
|
6 |
+
response = requests.get(url)
|
7 |
+
doc = Document(response.text)
|
8 |
+
return doc.summary()
|
9 |
+
|
10 |
+
app = gr.Interface(fn=read_later, inputs=gr.inputs.Textbox(placeholder="Enter URL"), outputs=gr.outputs.Text)
|
11 |
+
app.launch()
|