Spaces:
Running
Running
ksvmuralidhar
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ import redis
|
|
10 |
from datetime import datetime
|
11 |
from functools import lru_cache
|
12 |
from word_cloud import get_frequent_words_html
|
13 |
-
from config import NEWS_RETENTION_SECONDS
|
14 |
|
15 |
|
16 |
app = Flask(__name__)
|
@@ -176,7 +176,7 @@ def index():
|
|
176 |
last_update_utc = datetime.strptime(redis_client.get('NEWSFETCHTIME'), '%Y-%m-%d %H:%M:%S.%f')
|
177 |
last_update_mins = int(np.ceil((datetime.now() - last_update_utc).seconds / 60))
|
178 |
last_update_str = f'Updated {last_update_mins} {"minutes" if last_update_mins > 1 else "minute"} ago'
|
179 |
-
result_str += f'<p class="srctxt">News aggregated from <b>{src_str}</b>.<br><br>{last_update_str}</p>'
|
180 |
|
181 |
result_str += '''
|
182 |
<div class="input-container">
|
|
|
10 |
from datetime import datetime
|
11 |
from functools import lru_cache
|
12 |
from word_cloud import get_frequent_words_html
|
13 |
+
from config import NEWS_RETENTION_SECONDS, UK_EDITION_URL
|
14 |
|
15 |
|
16 |
app = Flask(__name__)
|
|
|
176 |
last_update_utc = datetime.strptime(redis_client.get('NEWSFETCHTIME'), '%Y-%m-%d %H:%M:%S.%f')
|
177 |
last_update_mins = int(np.ceil((datetime.now() - last_update_utc).seconds / 60))
|
178 |
last_update_str = f'Updated {last_update_mins} {"minutes" if last_update_mins > 1 else "minute"} ago'
|
179 |
+
result_str += f'<p class="srctxt">News aggregated from <b>{src_str}</b>.<br><br>{last_update_str} <a href="{UK_EDITION_URL}">Switch to UK edition</a></p>'
|
180 |
|
181 |
result_str += '''
|
182 |
<div class="input-container">
|