A Python project that generates creative stories using Google's Gemini AI.
- Generates creative stories based on user-provided themes
- Uses Google's Gemini AI for natural language generation
- Simple command-line interface
- Customizable story prompts
-
Clone this repository
-
Install required packages:
pip install python-dotenv google-generativeai
-
Create a
.envfile in the project root directory with your Google API key:GOOGLE_API_KEY=your_api_key_hereGet your API key from: https://makersuite.google.com/app/apikey
-
Run the story generator:
python src/story_generator.py
-
Enter a theme when prompted (e.g., "a magical forest", "a space adventure")
-
The program will generate and display a creative story based on your theme
project/
├── src/
│ └── story_generator.py # Main story generation script
├── .env # API key configuration
└── README.md # This file
- Python 3.8+
- google-generativeai
- python-dotenv
This project uses Google's Gemini AI API, which has free tier limitations:
- 60 requests per minute
- 1M characters per month
- 100 images per month
- Save generated stories to files
- Add different story genres
- Customize story length
- Add character customization
- Create a GUI interface