๐ป GhostWriter AI: A Local AI-Powered Spooky Story Generator
Have you ever wanted to create spooky stories using AI while running the model on your own computer?
That's the idea behind GhostWriter AI, a Python-based project that combines Streamlit and Ollama to generate horror-themed fictional stories using a locally running AI model.
I built this project to learn how local AI models can be integrated into a simple, interactive web application.
๐ก The Problem
Writing stories can be fun, but coming up with new ideas, characters, and mysterious situations can sometimes be challenging.
I wanted to experiment with an AI-powered application that could help generate spooky stories through a simple interface.
๐ My Solution
GhostWriter AI lets users choose an available story theme and length, generate a fictional story, and save it to a Story Library.
The application uses Python for its logic, Streamlit for its interface, and Ollama to connect to a locally running AI model.
โจ Features
- ๐ป Generate spooky and horror-themed stories.
- ๐ญ Choose from the available story themes.
- ๐ Select an available story length.
- ๐ Save generated stories to a Story Library.
- ๐พ Store saved stories locally in JSON format.
- ๐ฅ๏ธ Run the application locally using Streamlit and Ollama.
๐ ๏ธ Technology Stack
- Python โ application logic
- Streamlit โ interactive web interface
- Ollama โ local AI model runtime
- Qwen2.5 0.5B โ the model I tested during development
- JSON โ local story storage
- Git and GitHub โ version control and project hosting
โ๏ธ How It Works
- Open the GhostWriter AI application.
- Select an available story theme and length.
- Click the Generate Story button.
- The application sends a prompt to the configured AI model through Ollama.
- The generated story appears in the application.
- Save the story to the Story Library.
- Revisit the library to view saved stories.
๐งช What I Tested
During development, I verified that the Streamlit application launches locally and that the Story Library can display saved stories.
I also tested the local Ollama installation and confirmed that the qwen2.5:0.5b model was available and could return a text response.
I tested saving stories and checking whether they appeared in the Story Library.
These tests helped me understand how the different parts of the application work together.
๐ Why Local and Open-Weight AI?
One interesting part of this project is experimenting with an open-weight model running locally.
This approach lets developers explore AI integration without depending entirely on a cloud-based AI API for every interaction.
It also gave me practical experience with local model installation, model availability, and connecting Python applications to Ollama.
๐ What I Learned
While building GhostWriter AI, I gained experience with:
- Creating a web interface using Streamlit.
- Working with Python functions and application logic.
- Connecting to a local AI model through Ollama.
- Generating text using prompts.
- Saving and loading data with JSON.
- Using Git and GitHub to manage project code.
- Testing application features and troubleshooting errors.
๐ฎ Future Improvements
There are several features I would like to explore next:
- More story genres and themes.
- Better controls for writing style and story length.
- Search and filtering in the Story Library.
- Story editing and deletion.
- Exporting stories to text or PDF.
- Improved error handling and model status messages.
- Automated tests for important application features.
These are future ideas and are not all implemented in the current version.
๐ป Try the Project
GitHub Repository:
[https://github.com/perarasusperarasu0-dev/GhostWriterAI.git
]
The repository contains the project source code and setup instructions.
๐ฏ Final Thoughts
GhostWriter AI was a valuable learning experience that helped me explore Python, Streamlit, and local AI integration in one project.
I'm looking forward to improving the application and learning more about open-weight AI models.
Building small projects is a great way to understand how different technologies work together!
Built with Python, Streamlit, and Ollama. ๐ป
Top comments (0)