Spaces:
Runtime error
Runtime error
Add readme
Browse files
READ.md
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Ads generation tool
|
2 |
+
Give an URL, generate headlines and images for ads.
|
3 |
+
|
4 |
+
# Installation
|
5 |
+
1. Install python (make sure to add the environment variables and install pip).
|
6 |
+
a. Windows: https://www.digitalocean.com/community/tutorials/install-python-windows-10#step-1-downloading-the-python-installer.
|
7 |
+
2. Test pythong with `python -v`.
|
8 |
+
3. Download: https://github.com/lgaleana/gen-ads/zipball/master.
|
9 |
+
|
10 |
+
# Execution
|
11 |
+
1. Open the command line and navigate to the `gen-ads` folder.
|
12 |
+
2. Run `python main.py`.
|
13 |
+
3. Enter an URL and hit enter.
|
14 |
+
4. Get ad headlines and images for the URL.
|
15 |
+
|
16 |
+
# How does it work:
|
17 |
+
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:
|
18 |
+
1. (Code) [get_text_from_url](https://github.com/lgaleana/gen-ads/blob/main/code_tasks/url_text.py): Function generated by ChatGPT-4, that extracts text from an URL.
|
19 |
+
2. (AI) [get_headlines](https://github.com/lgaleana/gen-ads/blob/main/ai_tasks/best_headlines.py): From the text, generates headlines.
|
20 |
+
3. (AI) [generate_prompt](https://github.com/lgaleana/gen-ads/blob/main/ai_tasks/image_prompt.py): From text, generates a prompt to generate an image.
|
21 |
+
4. (AI) [image.urls](https://github.com/lgaleana/gen-ads/blob/main/ai/image.py): Generates AI images.
|
22 |
+
|
23 |
+
# How to tune it:
|
24 |
+
Update the prompts of the [AI tasks](https://github.com/lgaleana/gen-ads/tree/main/ai_tasks).
|