This is a simple AI-powered Customer Persona Generator built using Python, Flask, and OpenAI's GPT-3. It generates detailed customer personas based on provided product and audience information. The tool was developed as a side project in our free time to explore the capabilities of language models in creating fictional customer profiles, which can be useful for marketing, user research, or product development teams. It allows easy deployment as a Flask-based web API.
- Generates customer personas based on input details (product and target audience).
- Easy-to-use Flask-based web API.
- Outputs detailed personas with information like age, gender, location, and buying habits.
- Python
- Flask
- OpenAI GPT-3
-
Clone the repository
git clone https://github.com/yourusername/AI-Customer-Persona-Generator.git cd AI-Customer-Persona-Generator
-
Set up a virtual environment (optional but recommended):
python3 -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required packages
pip install -r requirements.txt
-
Set up your OpenAI API key Replace "YOUR-API-KEY" in the script with your actual OpenAI API key.
-
Run the Flask app
python app.py
Once the server is running, you can make a POST request to /generate_persona.
Example:
curl -X POST http://127.0.0.1:5000/generate_persona \
-H "Content-Type: application/json" \
-d '{"product_info": "Smartphone", "audience_info": "Tech-savvy millennials"}'
Expected Output:
{
"persona": "Meet Alex, a 28-year-old tech enthusiast who lives in North America..."
}
Feel free to open issues/ submit pull requests for feature suggestions or bug fixes. Contributions are welcome!