bc485b44b8
- Enhanced README.md with a clearer project overview, features, technologies used, and installation instructions. - Updated vector dimension in config.py from 4096 to 1024 for Cohere embeddings. - Modified main.py to serve HTML responses for the home page, news fetching, and recommendations. - Improved error handling and ensured articles have links in the responses. - Cleaned up news_fetcher.py by removing unnecessary print statements. - Updated recommender.py to refine insights generation and summary extraction. - Added Jinja2 for templating and improved the project structure for better organization. - Included API documentation for better understanding of endpoints and usage.
42 lines
1.8 KiB
HTML
42 lines
1.8 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Latest News - DS Task AI News{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="space-y-6">
|
|
<h2 class="text-3xl font-bold text-gray-800 mb-6">Latest News Articles</h2>
|
|
|
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
{% for article in articles %}
|
|
<article class="article-card bg-white rounded-lg shadow-md overflow-hidden">
|
|
<div class="p-6">
|
|
<h3 class="text-xl font-semibold text-gray-800 mb-2">
|
|
<a href="{{ article.link }}" target="_blank" class="hover:text-blue-600">
|
|
{{ article.title }}
|
|
</a>
|
|
</h3>
|
|
<p class="text-gray-600 mb-4">{{ article.content[:200] }}...</p>
|
|
<div class="flex justify-between items-center text-sm text-gray-500">
|
|
<span>{{ article.source }}</span>
|
|
<span>{{ article.published }}</span>
|
|
</div>
|
|
{% if article.categories %}
|
|
<div class="mt-4 flex flex-wrap gap-2">
|
|
{% for category in article.categories %}
|
|
<span class="px-2 py-1 bg-blue-100 text-blue-800 rounded-full text-xs">
|
|
{{ category }}
|
|
</span>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
<div class="mt-4">
|
|
<a href="{{ article.link }}" target="_blank" class="inline-block bg-blue-600 text-white px-4 py-2 rounded-md font-medium hover:bg-blue-700 transition-colors duration-300">
|
|
Read More
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</article>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endblock %} |