{"slug": "halloween-folklore-ai", "title": "HALLOWEEN FOLKLORE AI", "summary": "A developer built a minimalist, monochrome Halloween folklore web app for Hacktoberfest Week 4, combining Google Apps Script, the Wikipedia Action API, and Hugging Face's Inference API running Mistral-7B-Instruct. The serverless backend queries Wikipedia with a compliant User-Agent, caches responses via CacheService, and uses the model to synthesize search results into atmospheric narratives, with a rule-based fallback when no API key is supplied.", "body_md": "_Introduction\n\n_For Hacktoberfest Week 4, I built a minimalist, monochrome web application powered by Google Apps Script (GAS), the Wikipedia API, and Hugging Face’s Inference API.\n\nThe app allows users to input any keyword (e.g., \"cats,\" \"celt,\" \"mirrors,\" or \"harvest\") to discover spooky Halloween folklore, myths, and historical traditions curated dynamically by AI and Wikipedia.\n\n_Features & Highlights\n\n_\n\nMonochrome Minimalist UI: Designed with a high-contrast, clean typographic aesthetic (inspired by old literary archives) using custom CSS and Google Fonts (Shippori Mincho and Cinzel).\n\nGoogle Apps Script (GAS) Backend: Serverless architecture handling API calls securely and managing server-side caching (CacheService) to optimize performance.\n\nWikipedia API Compliance: Fully adheres to Wikimedia’s User-Agent policy by passing a descriptive user agent and respecting data usage guidelines under CC BY-SA 4.0.\n\nHugging Face AI Integration: Connects to Hugging Face’s Inference API (Mistral-7B-Instruct) to synthesize and enrich Wikipedia search results with an eerie, atmospheric Halloween narrative (complete with a robust rule-based fallback if the API key isn't provided).\n\n_Tech StackFrontend:\n\n_\n\nHTML5, CSS3, Vanilla JavaScript (Single-file template)\n\nBackend: Google Apps Script (JavaScript)\n\nAPIs: Wikipedia Action API, Hugging Face Inference API\n\n_Code Architecture\n\n_\n\nBackend (index.gs)\n\nThe GAS backend handles incoming requests, queries the Wikipedia API while strictly passing a compliant User-Agent header, processes the extracts through Hugging Face, and returns a structured JSON payload to the client.\n\nFrontend (UI.html)\n\nA clean, distraction-free search interface featuring asynchronous requests via google.script.run, smooth CSS animations, and direct links back to original Wikipedia articles for full reading compliance.\n\nLicense & Acknowledgements\n\nBuilt for Hacktoberfest.\n\nWikipedia data provided under the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.", "url": "https://wpnews.pro/news/halloween-folklore-ai", "canonical_source": "https://dev.to/shintarotakahata2323/halloween-folklore-ai-h7e", "published_at": "2026-10-30 23:44:25+00:00", "updated_at": "2026-10-30 23:49:16.853081+00:00", "lang": "en", "topics": ["ai-tools", "generative-ai", "large-language-models", "developer-tools"], "entities": ["Google Apps Script", "Wikipedia", "Hugging Face", "Mistral-7B-Instruct", "Hacktoberfest"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/halloween-folklore-ai", "markdown": "https://wpnews.pro/news/halloween-folklore-ai.md", "text": "https://wpnews.pro/news/halloween-folklore-ai.txt", "jsonld": "https://wpnews.pro/news/halloween-folklore-ai.jsonld"}}