HN Distilled Released
Today I finished development of my next small project called HN Distilled (Hacker News Distilled).
The main idea is to extract main themes and ideas from each post comment section. Conversion of comments to themes is done by using the Gemini Flash 2.0 model, connected via openrouter.ai. On the backend side, I have Python code which extracts comments from the Algolia API and pass it to Gemini model for further prompting:
def extract_comments(item: Dict) -> List[Dict[Any, Any]]:
"""Recursively extract comments from Algolia API response"""
comments = []
if "children" in item:
for child in item["children"]:
if (child.get("text") and
child.get("author") and
not child.get("deleted") and
not child.get("dead")):
comments.append({
"text": html.unescape(child["text"]),
"author": child["author"]
})
# Recursively get child comments
comments.extend(HNService.extract_comments(child))
return comments
As for deployment and hosting I used Fly.io which is currently my favorite way of hosting small apps