Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import requests
|
3 |
+
import json
|
4 |
+
|
5 |
+
|
6 |
+
|
7 |
+
|
8 |
+
def get_rss(rss_json_url):
|
9 |
+
r = requests.get(f'{rss_json_url}')
|
10 |
+
lod = json.loads(r.text)
|
11 |
+
return lod
|
12 |
+
|
13 |
+
with gr.Blocks() as app:
|
14 |
+
with gr.Row():
|
15 |
+
inp = gr.Textbox()
|
16 |
+
btn = gr.Button()
|
17 |
+
out_json = gr.JSON()
|
18 |
+
btn.click(get_rss,inp,out_json)
|
19 |
+
app.launch()
|