Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -496,6 +496,22 @@ def load_data(rss_url=None):
|
|
496 |
#filename_end_far=filename_end.split(":")[2]
|
497 |
print (filename)
|
498 |
yield lod,[(None,f'Source is current as of:\n{filename_start} {filename_end} UTC\n\nThe current Date and Time is:\n{timestamp} UTC')]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
499 |
|
500 |
with gr.Blocks() as app:
|
501 |
cb = gr.Chatbot(height=600, show_share_button=True, show_copy_button=True)
|
|
|
496 |
#filename_end_far=filename_end.split(":")[2]
|
497 |
print (filename)
|
498 |
yield lod,[(None,f'Source is current as of:\n{filename_start} {filename_end} UTC\n\nThe current Date and Time is:\n{timestamp} UTC')]
|
499 |
+
|
500 |
+
|
501 |
+
def load_html(conv):
|
502 |
+
ht=""
|
503 |
+
ht+=f"""<div class="div_box">"""
|
504 |
+
ht+=f"""<pre class="bpost"><div class="bhead"><h2>{conv['title']}</h2><br><h5>{conv['description']}</h5><br>{conv['links']}</div>{conv['article']}</pre>"""
|
505 |
+
ht+=f"""</div>"""
|
506 |
+
|
507 |
+
with open('index.html','r') as h:
|
508 |
+
html=h.read()
|
509 |
+
html = html.replace("$body",f"{ht}")
|
510 |
+
h.close()
|
511 |
+
return html
|
512 |
+
|
513 |
+
|
514 |
+
|
515 |
|
516 |
with gr.Blocks() as app:
|
517 |
cb = gr.Chatbot(height=600, show_share_button=True, show_copy_button=True)
|