GhostWriter AI – Stories from the Shadows
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine What I Built For this week's Ghost in the Machine challenge, I built GhostWriter AI – Stories from the Shadows , an AI-powered horror and mystery story generator that brings imagination to life using open-weight AI. The inspiration came from the mysterious atmosphere of Halloween, abandoned places,…
This narrative recounts the development of GhostWriter AI, an innovative tool that generates original horror and mystery stories using open-source artificial intelligence technology. Created as part of the Hacktoberfest Open-Source AI Challenge, GhostWriter AI offers users a unique opportunity to craft their own supernatural narratives.
The inspiration behind GhostWriter AI stemmed from Halloween's eerie ambiance, haunted locales, and the notion that untold stories might reside within forgotten spaces. The project allows users to personalize their tales by selecting a haunted location, a main character or concept, an atmospheric tone, and a final twist. These choices form the basis of a custom prompt which the AI then processes to produce a unique story directly within the user's web browser.
GhostWriter AI employs an open-weight language model, Qwen2.5-0.5B-Instruct, which runs locally in the browser. This approach eliminates the need for costly, closed-source AI services, offering users privacy, control over their creative inputs, and the freedom to experiment with different models and settings. The project incorporates HTML for website structure, CSS for an immersive, Halloween-themed interface, and JavaScript to manage user interactions and integrate the AI model using Hugging Face Transformers.js.
The user journey involves selecting a haunted setting, inputting a character or story idea, choosing an atmosphere, and finally clicking a generate button. The AI model interprets these inputs and delivers an original ghost story, complete with a title, which users can read and share. This hands-on project not only fosters creativity but also serves as an educational tool for those interested in AI integration within web applications.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.