CoolFace
Apppublic

jnguy097/RPGCharCreator

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
0likes
App README

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

  1. 1.Clone the repository:
   git clone https://github.com/yourusername/rpg-character-generator.git
   cd rpg-character-generator
  1. 1.Install dependencies:
   pip install -r requirements.txt
  1. 1.Run the app:
   python app.py

Usage

  1. 1.Select Mode: Text only or Story + Images
  2. 2.Choose Character Class and Alignment (or Random)
  3. 3.Enter Character Name
  4. 4.(Optional) Provide a custom prompt
  5. 5.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.

  1. 1.Push the repository to your Hugging Face account.
  2. 2.Make sure requirements.txt is included.
  3. 3.Set the app.py as the entry point.
  4. 4.Use the share=True flag 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]