Ghost Story Generator:以 AI 生成恐怖故事
👻 Ghost Story Generator: Bringing AI-Powered Horror Stories to Life
DEV Week 4 Challenge 的參與者製作了 Ghost Story Generator,這是一個以 AI 根據用戶輸入生成恐怖故事的網頁應用程式。用戶可提供故事構想、選擇氣氛和篇幅,並可加入場景;應用程式使用 Hugging Face Transformers 和 FLAN-T5 Small,生成的故事可下載為文字檔。
Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼
👻 Ghost Story Generator — An AI-Powered Spooky Story Creator
Ever wondered what happens when AI enters the world of ghosts, mysteries, and spooky stories? 👀
For the DEV Week 4 Challenge, I built Ghost Story Generator, a simple web app that creates spooky stories using AI!
💡 What is this project?
Ghost Story Generator is a web application where users can enter a story idea, choose a mood, select a story length, and optionally provide a setting. The AI then attempts to generate a unique story based on those inputs.
Whether it's an abandoned college, a mysterious forest, or strange footsteps at midnight, your imagination provides the starting point! 🌙
✨ Features
- 👻 Generate stories from your own ideas.
- 🌙 Choose a mood: Spooky, Mysterious, Funny, or Folklore-inspired.
- 📖 Select the approximate story length.
- 🏚️ Add a custom setting for your story.
- 📥 Download the generated story as a text file.
🛠️ Tech Stack
- Python — Application logic
- Streamlit — Web application interface
- Hugging Face Transformers — AI text generation
- FLAN-T5 Small — Language model used for story generation
🚀 How It Works
- Enter a story idea.
- Select your preferred mood and story length.
- Add a setting if you want.
- Click the generate button.
- Read your AI-generated story and download it.
The model may need to download the first time the app runs, so an internet connection is recommended during initial setup.
💻 GitHub Repository
🔗 Project Source Code:
https://github.com/pavaniverma18-blip/ghost-story-generator
📚 What I Learned
Building this project helped me explore Streamlit, experiment with AI text-generation models, and understand how to connect a machine learning model to a simple web interface.
I also learned that getting an AI application to run reliably requires testing, debugging, and handling errors—not just writing code!
👀 What's Next?
I'd love to improve the project with more creative story styles, better story quality, and additional customization options.
If you could generate a horror story about anything, what would your idea be? Share it in the comments! 👇
#devchallengesvg #hf26challengesvg
來源:DEV Community · dev.to
