File size: 1,416 Bytes
822da20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4ef5c66
 
 
822da20
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Ads generation tool
Give an URL, generate headlines and images for ads.

# Installation
1. Install python (make sure to add the environment variables and install pip).
  a. Windows: https://www.digitalocean.com/community/tutorials/install-python-windows-10#step-1-downloading-the-python-installer.
2. Test pythong with `python -v`.
3. Download: https://github.com/lgaleana/gen-ads/zipball/master.

# Execution
1. Open the command line and navigate to the `gen-ads` folder.
2. Run `python main.py`.
3. Enter an URL and hit enter.
4. Get ad headlines and images for the URL.

# How does it work:
The program executes the following [AI and code tasks](https://github.com/lgaleana/gen-ads/blob/main/control_flow/main.py), one after the other:
1. (Code) [get_text_from_url](https://github.com/lgaleana/gen-ads/blob/main/code_tasks/url_text.py#L2): Function generated by ChatGPT-4, that extracts text from an URL.
2. (AI) [get_headlines](https://github.com/lgaleana/gen-ads/blob/main/ai_tasks/best_headlines.py#L5): From the text, generates headlines.
3. (AI) [generate_prompt](https://github.com/lgaleana/gen-ads/blob/main/ai_tasks/image_prompt.py#L5): From text, generates a prompt to generate an image.
4. (AI) [image.urls](https://github.com/lgaleana/gen-ads/blob/main/ai/image.py): Generates AI images.

# How to tune it:
Update the prompts of the [AI tasks](https://github.com/lgaleana/gen-ads/tree/main/ai_tasks).