Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,7 @@ import redis
|
|
10 |
import uuid
|
11 |
from datetime import datetime
|
12 |
from functools import lru_cache
|
|
|
13 |
from word_cloud import get_frequent_words_html
|
14 |
from config import NEWS_RETENTION_SECONDS, UK_EDITION_URL
|
15 |
|
@@ -244,6 +245,7 @@ def index():
|
|
244 |
|
245 |
result_str += '</form></div>'
|
246 |
logging.warning(f'[session_id: {session_id}] Successfully rendered template')
|
|
|
247 |
return render_template("index.html", body=result_str), status_code
|
248 |
|
249 |
|
|
|
10 |
import uuid
|
11 |
from datetime import datetime
|
12 |
from functools import lru_cache
|
13 |
+
import gc
|
14 |
from word_cloud import get_frequent_words_html
|
15 |
from config import NEWS_RETENTION_SECONDS, UK_EDITION_URL
|
16 |
|
|
|
245 |
|
246 |
result_str += '</form></div>'
|
247 |
logging.warning(f'[session_id: {session_id}] Successfully rendered template')
|
248 |
+
gc.collect()
|
249 |
return render_template("index.html", body=result_str), status_code
|
250 |
|
251 |
|