jnguy097/RPGCharCreator
0
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
RPG Character Generator App
An interactive AI-powered web application that generates rich, fantasy-inspired RPG characters — complete with story, images, and voice. Built with cutting-edge models and a beautifully themed Gradio interface.
Features
- Story Generation (GPT-2) Generates a custom narrative for your character based on class, alignment, and name.
- Image Generation (Stable Diffusion) Creates character or scene images from the story.
- Text-to-Speech (SpeechT5 + HiFi-GAN) Converts the generated story to high-quality audio narration.
- Randomized Options Includes random alignment selection and dropdowns for class and alignment.
- Fantasy-Themed Web Interface Styled with a brown-and-gold medieval theme using Gradio and custom CSS.
- Deployment-Ready Runs locally or on Hugging Face Spaces.
Tech Stack
- Python
- Transformers (
GPT-2,SpeechT5) - Diffusers (
Stable Diffusion) - Gradio
- Torch
- Soundfile
- Hugging Face Spaces (optional deployment)
Installation
- Clone the repository:
git clone https://github.com/yourusername/rpg-character-generator.git
cd rpg-character-generator- Install dependencies:
pip install -r requirements.txt- Run the app:
python app.pyUsage
- Select Mode: Text only or Story + Images
- Choose Character Class and Alignment (or Random)
- Enter Character Name
- (Optional) Provide a custom prompt
- Click Run to generate the character’s story, image, and audio
Example Workflow
- Mode: Story + Images
- Class: Wizard
- Alignment: Chaotic Good
- Name: Elara Moonshadow
- Prompt: (optional, can be left blank)
The app will generate:
- A unique character story
- Three related images
- An audio narration of the story
Deployment
This app can be deployed on Hugging Face Spaces.
- Push the repository to your Hugging Face account.
- Make sure
requirements.txtis included. - Set the
app.pyas the entry point. - Use the
share=Trueflag in Gradio to make it public.
Future Improvements
- Support for longer audio narration with smoother splitting
- Integration of MusicGen for background music
- Downloadable character profiles as ZIP
- GPT-3.5/GPT-4 upgrade for richer stories
Credits
- OpenAI GPT-2
- Hugging Face Transformers
- Hugging Face Diffusers
- Gradio Team
- Project by [Jimmy Nguyen]
