Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -200,6 +200,7 @@ def find_all(purpose,task,history, rss_url, result):
|
|
200 |
def find_rss():
|
201 |
lod=""
|
202 |
out_box=[]
|
|
|
203 |
with open ('feeds.json','r') as j:
|
204 |
cont = json.loads(j.read())
|
205 |
#print(cont)
|
@@ -250,12 +251,13 @@ def find_rss():
|
|
250 |
print(f'Exception::{ea.keys()}')
|
251 |
|
252 |
out_box.append(lod)
|
253 |
-
return out_box
|
254 |
|
255 |
with gr.Blocks() as app:
|
|
|
256 |
with gr.Row():
|
257 |
-
rss_search = gr.Textbox(label="
|
258 |
-
search_btn=gr.Button("
|
259 |
with gr.Row():
|
260 |
rss = gr.Textbox(label="rss")
|
261 |
btn = gr.Button("load rss")
|
@@ -263,7 +265,7 @@ with gr.Blocks() as app:
|
|
263 |
with gr.Row():
|
264 |
out_json = gr.JSON()
|
265 |
fil = gr.Textbox()
|
266 |
-
r_btn.click(find_rss,None,out_json)
|
267 |
#r_btn.click(read_rss,None,[out_json,fil])
|
268 |
#search_btn.click(find_rss,rss_search,out_json)
|
269 |
#btn.click(get_rss,rss,out_json)
|
|
|
200 |
def find_rss():
|
201 |
lod=""
|
202 |
out_box=[]
|
203 |
+
yield [],[(None,"loading sources")]
|
204 |
with open ('feeds.json','r') as j:
|
205 |
cont = json.loads(j.read())
|
206 |
#print(cont)
|
|
|
251 |
print(f'Exception::{ea.keys()}')
|
252 |
|
253 |
out_box.append(lod)
|
254 |
+
return out_box,[(None,"loading sources")]
|
255 |
|
256 |
with gr.Blocks() as app:
|
257 |
+
cb = gr.Chatbot()
|
258 |
with gr.Row():
|
259 |
+
rss_search = gr.Textbox(label="Instructions")
|
260 |
+
search_btn=gr.Button("Send")
|
261 |
with gr.Row():
|
262 |
rss = gr.Textbox(label="rss")
|
263 |
btn = gr.Button("load rss")
|
|
|
265 |
with gr.Row():
|
266 |
out_json = gr.JSON()
|
267 |
fil = gr.Textbox()
|
268 |
+
r_btn.click(find_rss,None,[out_json,chatbot])
|
269 |
#r_btn.click(read_rss,None,[out_json,fil])
|
270 |
#search_btn.click(find_rss,rss_search,out_json)
|
271 |
#btn.click(get_rss,rss,out_json)
|