This is a Flask application that generates a cold email using the davinci text 003
model.
The email is generated based on a target URL and an origin URL provided by the user.
Before running the application, make sure you have the following installed:
- Python 3
- Flask
- OpenAI Python library
- requests library
- BeautifulSoup library
- Clone the repository or download the code files.
- Install the required libraries using the following command:
pip install -r requirements.txt
To use the OpenAI API, you need to set your API key in the code. Replace "YOUR_API_KEY"
with your actual OpenAI API key.
- Start the application by running the following command:
python ./email_api.py
- Open a web browser and navigate to
http://localhost:5000
. - The home page will be displayed, and you can enter the target URL and origin URL in the provided input fields.
- Click the "Generate Email" button to generate the cold email.
- The generated email will be displayed on a new page.
Note: The target URL and origin URL should be valid URLs that contain the web content you want to use for generating the email.
- This code assumes you have a basic understanding of Flask and web development.
- Make sure to handle error cases and perform input validation as needed.
- The OpenAI GPT-3.5 model is used to generate the email. You may need to have appropriate access and resources from OpenAI to use this model.