CharacterCraft is a web application that allows users to generate unique and detailed characters for their stories, role-playing games, or any other creative project. Using OpenAI's API, CharacterCraft generates a wide range of character attributes such as gender, age, occupation, physical appearance, and more.
- Character generation: Users can generate a character by filling out a simple form with the desired attributes. If left blank, the attributes will be generated by OpenAI's API.
- Character storage: Each generated character is given a unique ID and stored on the server, allowing users to access and view characters at any time.
- Character viewing: Users can view generated characters in detail, including all attributes and a detailed description.
CharacterCraft is built using the Flask web framework for Python. It uses OpenAI's API for character generation and SQLite for character storage. The front-end is built with HTML, CSS, and JavaScript.
- Character editing: Users will be able to edit their generated characters.
- Character sharing: Users will be able to share their generated characters with other users.
- Character searching: Users will be able to search for specific generated characters.
CharacterCraft is a powerful tool for any creative project and is constantly being updated and improved to better serve its users. Whether you're an author, game master, or just looking for inspiration, CharacterCraft is the perfect tool for generating unique and detailed characters.
This guide will walk you through the process of setting up the CharacterCraft web application on your server.
- A server running Linux (Ubuntu 18.04 LTS recommended)
- Python 3.6 or higher
- pip3
- Git
- An OpenAI API key (https://openai.com/api)
Make sure that your server has Python 3.6 or higher installed by running python3 -V.
If not already installed, install pip3 by running sudo apt-get install python3-pip.
Use pip3 to install Flask by running pip3 install flask.
Verify that Flask was installed correctly by running python3 -c "import flask; print(flask.version)". This should print the version of Flask that was installed.
Clone the CharacterCraft repository to your server by running git clone https://github.com/saberswordboy/charactergenerator.
Navigate to the root directory of the repository.
Create a virtual environment by running python3 -m venv venv
. This will create a new directory called "venv" in the root directory of the repository.
Activate the virtual environment by running source venv/bin/activate
.
Install the required packages by running pip3 install -r packages.txt
.
Create a new file named .env and add the following line to it: API_KEY="YOUR API KEY HERE"
Run flask run
to start the server
Your CharacterCraft web application should now be running and accessible at the server's IP address on port 80. You may need to check permissions if this does not work, as port 80 requires root permissions.