Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,10 +10,10 @@ import json
|
|
10 |
def read_rss():
|
11 |
f = open('feeds_sorted.json')
|
12 |
data = json.load(f)
|
13 |
-
with open('tmp.json','w') as f:
|
14 |
-
|
15 |
-
f.close()
|
16 |
-
return data,
|
17 |
|
18 |
def find_rss(rss_url):
|
19 |
json_box=[]
|
@@ -54,8 +54,8 @@ with gr.Blocks() as app:
|
|
54 |
btn = gr.Button("load rss")
|
55 |
r_btn=gr.Button("read")
|
56 |
with gr.Row():
|
57 |
-
out_json = gr.
|
58 |
-
fil = gr.
|
59 |
r_btn.click(read_rss,None,[out_json,fil])
|
60 |
search_btn.click(find_rss,rss_search,out_json)
|
61 |
btn.click(get_rss,rss,out_json)
|
|
|
10 |
def read_rss():
|
11 |
f = open('feeds_sorted.json')
|
12 |
data = json.load(f)
|
13 |
+
#with open('tmp.json','w') as f:
|
14 |
+
out = json.dumps(data, indent=4)
|
15 |
+
#f.close()
|
16 |
+
return data, out
|
17 |
|
18 |
def find_rss(rss_url):
|
19 |
json_box=[]
|
|
|
54 |
btn = gr.Button("load rss")
|
55 |
r_btn=gr.Button("read")
|
56 |
with gr.Row():
|
57 |
+
out_json = gr.JSON()
|
58 |
+
fil = gr.Textbox()
|
59 |
r_btn.click(read_rss,None,[out_json,fil])
|
60 |
search_btn.click(find_rss,rss_search,out_json)
|
61 |
btn.click(get_rss,rss,out_json)
|