GhostStoriesAI 👻: Bringing Ghost Stories to Life with Local AI
What if you could create your own spooky ghost stories without sending every prompt to an online AI service? 👻 For the Hacktoberfest 2026 Week 4 challenge, Ghost in the Machine , I built GhostStoriesAI — a Python command-line application that generates spooky stories using a locally running AI mod

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼
What if you could create your own spooky ghost stories without sending every prompt to an online AI service? 👻
For the Hacktoberfest 2026 Week 4 challenge, Ghost in the Machine, I built GhostStoriesAI — a Python command-line application that generates spooky stories using a locally running AI model.
This project was a fun way to explore local AI, Python, and the possibilities of open-source AI tools.
GhostStoriesAI lets users enter a theme and generate a short, spooky ghost story. They can save stories they like and revisit them later.
The AI generated a chilling story about an old school, strange whispers in its corridors, and a spirit searching for a lost student.
The application then allowed me to save the story and read it again from the saved stories menu.
Here are the features I've implemented so far:
The application follows a simple workflow:
Here's a small example of how I call the model:
response = ollama. chat ( model = " gemma3:1b ", messages = [ { " role ": " user ", " content ": ( f " Write a short, spooky ghost story " f " in 5 sentences about { theme }. " ) } ] ) story = response [ " message " ][ " content " ] print ( story ) Enter fullscreen mode Exit fullscreen mode This is the core of the application: a Python program communicating with an AI model running locally through Ollama.
For me, one of the most interesting parts of this project was experimenting with local AI instead of relying on a hosted AI API.
Here are a few things I appreciate about this approach:
I can choose the model I want to run and experiment with different prompts. The application isn't tied to a single hosted AI API.
After the model has been downloaded and configured, story generation can happen locally. The prompts and generated stories do not need to be sent to a third-party AI inference service by this application.
Tools like Ollama make it easier for beginners to experiment with AI models and integrate them into their own Python applications.
This project could be extended with different storytelling styles, additional models, or a graphical interface. Working with accessible tools gives me a foundation for exploring those possibilities.
Local inference still requires suitable hardware and disk space, and downloading the model initially requires an internet connection. But once everything is set up, the application can generate stories without needing an online inference API.
Building GhostStoriesAI helped me practise several concepts:
I also learned that a useful AI application doesn't have to be complicated. Even a small command-line project can demonstrate how AI can be integrated into everyday programming.
GitHub repository: [Add your GhostStoriesAI repository link here]
ollama pull gemma3:1b Enter fullscreen mode Exit fullscreen mode Install the Python dependency: pip install -r requirements.txt Enter fullscreen mode Exit fullscreen mode Start the application: python app.py Enter fullscreen mode Exit fullscreen mode Make sure Ollama is running before generating stories.
I'd love to improve GhostStoriesAI with features such as:
For now, I'm happy to have built a working local AI story generator and explored how accessible AI tools can support small, creative projects.
GhostStoriesAI started with a simple idea: what if a locally running AI could tell spooky stories?
Building it gave me an opportunity to experiment with Python, Ollama, and Gemma while exploring the Ghost in the Machine theme for Hacktoberfest 2026.
Open innovation matters because it gives developers the freedom to experiment, learn, adapt, and build on accessible technologies.
What would you build with a locally running AI model?