跳到正文
DEV Community· GANAPATHI V·· 2 小時前AI 評分25

GhostMate AI:本地 AI 恐怖故事生成器

GhostMate AI: A Spooky Local AI Story Generator 👻

AI 導讀

GhostMate AI 是一款以 Python 和 Streamlit 建構的應用程式,使用 Ollama 在本機執行 Gemma 3 1B,生成恐怖故事及其他驚悚內容。用戶可選擇三種內容模式和短、中、長篇幅;模型下載後,只要 Ollama 和模型可用,便無須連接託管 AI API,即可在本機生成內容。

正文

Introduction

What if you could create spooky ghost stories using AI without depending on cloud-based AI services?

For Hacktoberfest Open-Source AI Challenge — Week 4, I built GhostMate AI, a simple AI-powered application that generates spooky stories using a locally running open-weight language model.

This project combines the spooky theme of “Ghost in the Machine” with the idea of making AI more accessible through open-source tools.

💡 What Is GhostMate AI?

GhostMate AI is a Python application built with Streamlit and Ollama. It uses the Gemma 3 1B model to generate different types of spooky content.

Users can choose from three modes:

  • 👻 Ghost Story: Generate a spooky ghost story.
  • 💻 Haunted Terminal: Create mysterious, haunted computer-style messages.
  • 🕯️ Forgotten Memory Tale: Generate a mysterious tale about forgotten memories.

Users can also choose the story length: Short, Medium, or Long.

🛠️ Technologies Used

  • Python — Application logic
  • Streamlit — User interface
  • Ollama — Running the AI model locally
  • Gemma 3 1B — Open-weight language model

⚙️ How It Works

  1. Run Ollama on your computer and download the Gemma 3 1B model.
  2. Start the GhostMate AI Streamlit application.
  3. Choose a spooky content mode and story length.
  4. Generate your story using the locally running model.

Once the model has been downloaded, the application can generate stories locally without requiring a hosted AI API, provided Ollama and the model are available on your computer.

🚀 Why I Built This Project

I wanted to explore how open-source AI could be used to build a fun, creative application with accessible tools.

As a learner, this project gave me practical experience connecting Python, a simple web interface, and a locally running language model.

I also wanted to explore AI beyond ordinary chatbots by creating something inspired by mystery, spooky stories, and the “Ghost in the Machine” theme.

🌍 Why Open Innovation Matters

Open innovation gives developers and learners opportunities to experiment, build, share, and learn from one another.

Open-weight models and tools such as Ollama make it possible to explore local AI without depending entirely on paid cloud APIs. Local inference can also help reduce the need to send prompts to an external AI service.

Projects like GhostMate AI show that even a small beginner-friendly application can be a useful step toward learning and experimenting with open-source AI.

🔗 Project Repository

GitHub: https://github.com/sanv3067/GhostMate-AI.git

The repository contains the source code and setup instructions.

📸 Demo

I tested the application locally and confirmed that it runs.

 so readers can see the interface and generated output.

🎃 Final Thoughts

Building GhostMate AI was an opportunity to experiment with local AI, Python, and open-source tools while exploring a spooky creative theme.

This project is a small step in my open-source learning journey, and I hope it inspires other beginners to experiment with local AI.

Built for the Hacktoberfest Open-Source AI Challenge — Week 4: Ghost in the Machine.

來源:DEV Community · dev.to