bep40 commited on
Commit
fa68ff5
·
verified ·
1 Parent(s): c65cfe6

Fix: AI topics now appear FIRST in hot topics (insert(0) instead of append)

Browse files

Changed append to insert(0) so AI topics like Công nghệ AI, World Cup 2026 appear at the top

Files changed (1) hide show
  1. app_v2_entry.py +1 -1
app_v2_entry.py CHANGED
@@ -484,7 +484,7 @@ def _get_hot_topics():
484
  if len(topics)>=20:break
485
  for kw in['World Cup 2026','Kinh tế Việt Nam','Bóng đá châu Âu','Công nghệ AI','Giá vàng','Thời tiết']:
486
  if len(topics)>=24:break
487
- if not any(kw.lower() in s for s in seen):topics.append({'label':'#'+re.sub(r'\s+','',kw.title()),'topic':kw,'count':0})
488
  _hot_cache.update({'t':now,'d':topics[:24]});return topics[:24]
489
 
490
  @app.get('/api/hot_topics')
 
484
  if len(topics)>=20:break
485
  for kw in['World Cup 2026','Kinh tế Việt Nam','Bóng đá châu Âu','Công nghệ AI','Giá vàng','Thời tiết']:
486
  if len(topics)>=24:break
487
+ if not any(kw.lower() in s for s in seen):topics.insert(0,{'label':'#'+re.sub(r'\s+','',kw.title()),'topic':kw,'count':0})
488
  _hot_cache.update({'t':now,'d':topics[:24]});return topics[:24]
489
 
490
  @app.get('/api/hot_topics')