Transform your imagination into captivating stories with the power of AI
An AI-powered storytelling platform. The user interface is Streamlit, not Gradio. Chat, stories, and the writing assistant call Google's Gemini models. Comic video generation does not run in this app: it calls the external Hugging Face Space ADOPLE/Video-Generator-AI and shows the video that Space returns. The gradio_client package is only the client for that Space.

- 🤖 AI ChatBot - Intelligent conversations with streaming responses
- 📚 Story Generator - Create stories from images or text prompts
- 🎬 Comic Video Generator - Send a script to an external Hugging Face Space and play the video it returns
- 🎯 AI Assistant - Writing help, grammar check, translation
- 🎨 Creative Writing - Poems, lyrics, character descriptions
The easiest way to get started is using our automated installation script:
- Download and run the installer
python install.py
The installer will automatically:
- ✅ Check Python version compatibility (3.9+)
- 📦 Install all required packages
- ⚙️ Create
.envfile template - 🔑 Guide you through API key setup
- 🧪 Test the installation
- 🚀 Launch the application
- Python Version Check: Ensures you have Python 3.9 or higher
- Package Installation: Installs all dependencies from requirements.txt
- Environment Setup: Creates
.envfile with proper template - API Key Configuration: Guides you to set up required API keys
- Installation Testing: Verifies all packages work correctly
- Application Launch: Optionally starts the Streamlit app
- Python 3.9 or higher
- Google API Key (Get one here)
- Hugging Face Token (Get one here)
-
Clone the repository
git clone https://github.com/Mohit6304/FableForgeAI-StoryEngine.git cd FableForgeAI-StoryEngine -
Install dependencies
pip install -r requirements.txt
-
Set up environment variables Create a
.envfile:GEMINI_API_KEY=your_google_api_key_here HUGGINGFACE_API_KEY=your_hugging_face_token_here
-
Run the application
streamlit run main.py
-
Open your browser Navigate to
http://localhost:8501
- Start conversations with AI
- Toggle streaming mode for real-time responses
- Save chat history
- Adjust temperature and token settings
- Image Stories: Upload an image and add text prompts
- Text Stories: Describe your story idea in detail
- Creative Writing: Generate poems, lyrics, character descriptions
- Choose genre, length, and tone
- Generate audio narration
- Write your story script
- Optionally preview a Gemini rewrite of that script (uses the sidebar model, temperature, and max tokens)
- Generate the video. The script is sent to the external Hugging Face Space
ADOPLE/Video-Generator-AI - Download the video that Space returns
This page sends only the script. It does not offer comic style, duration, character, or audio controls, because those values are not passed to the Space.
- Writing Help: Improve text, check grammar
- Translation: Multi-language support
- Tone Change: Adjust writing style
- Research: Get information and analysis
- Choose from multiple Gemini models. The selection is sent with each Gemini request
- Temperature (0.0–1.0) and max tokens (100–2048) are sent as Gemini
temperatureandmax_output_tokens
- Optional text-to-speech for generated stories
- Uses the Hugging Face inference API (
facebook/mms-tts-eng) and requiresHUGGINGFACE_API_KEY - One English voice; there is no voice picker
streamlit>=1.45.0
google-generativeai>=0.8.5
python-dotenv>=1.0.1
Pillow>=10.3.0
requests>=2.32.3
gradio-client>=1.3.0
numpy>=1.26.4
Your .env file should contain:
# Google Gemini API Key. GEMINI_API_KEY is preferred.
# If it is unset, the app reads GOOGLE_API_KEY instead.
GEMINI_API_KEY=your_api_key_here
# Hugging Face API Key (for story audio)
HUGGINGFACE_API_KEY=your_token_hereAPI Key Issues:
- Verify your
.envfile exists and contains valid keys - Check API key permissions and quotas
Installation Problems:
- Use
python install.pyfor automated setup - Ensure Python 3.9+ is installed
- Try creating a virtual environment
Import Errors:
- Run
pip install -r requirements.txtagain - Check Python path and virtual environment