[METHOD] Make Your Own PAA Site With OpenAI - Complete Tutorial + FREE Python Script

I installed python 3.10, installed panda & openai modules. I created a .py file with the code and added the openai api.
But when i try to open the .py this close inmediatley. I created a folder where i have the .py and the .csv

Why this close inmediatley when i open it?

I tried to open .py file with cmd but i have this error
Code:
Traceback (most recent call last):
  File "C:\Users\X\Desktop\Content\main2.py", line 13, in <module>
    prompt = f"Please write a detailed article about {row['topic']}. Use this information to write the article: {row['context']}"
  File "C:\Users\x\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pandas\core\series.py", line 981, in __getitem__
    return self._get_value(key)
  File "C:\Users\x\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pandas\core\series.py", line 1089, in _get_value
    loc = self.index.get_loc(label)
  File "C:\Users\x\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pandas\core\indexes\base.py", line 3805, in get_loc
    raise KeyError(key) from err
KeyError: 'topic'
 
Last edited:
I installed python 3.10, installed panda & openai modules. I created a .py file with the code and added the openai api.
But when i try to open the .py this close inmediatley. I created a folder where i have the .py and the .csv

Why this close inmediatley when i open it?

I tried to open .py file with cmd but i have this error
Code:
Traceback (most recent call last):
  File "C:\Users\X\Desktop\Content\main2.py", line 13, in <module>
    prompt = f"Please write a detailed article about {row['topic']}. Use this information to write the article: {row['context']}"
  File "C:\Users\x\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pandas\core\series.py", line 981, in __getitem__
    return self._get_value(key)
  File "C:\Users\x\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pandas\core\series.py", line 1089, in _get_value
    loc = self.index.get_loc(label)
  File "C:\Users\x\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pandas\core\indexes\base.py", line 3805, in get_loc
    raise KeyError(key) from err
KeyError: 'topic'

There’s something wrong with your input file. Some other people have had a similar issue before and resolved it by fixing the input file.
 
There’s something wrong with your input file. Some other people have had a similar issue before and resolved it by fixing the input file.
I solved it, for some reason it gave me error with the csv created with Excel, I had to do it with Google Sheets.
 
I installed python 3.10, installed panda & openai modules. I created a .py file with the code and added the openai api.
But when i try to open the .py this close inmediatley. I created a folder where i have the .py and the .csv

Why this close inmediatley when i open it?

I tried to open .py file with cmd but i have this error
Code:
Traceback (most recent call last):
  File "C:\Users\X\Desktop\Content\main2.py", line 13, in <module>
    prompt = f"Please write a detailed article about {row['topic']}. Use this information to write the article: {row['context']}"
  File "C:\Users\x\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pandas\core\series.py", line 981, in __getitem__
    return self._get_value(key)
  File "C:\Users\x\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pandas\core\series.py", line 1089, in _get_value
    loc = self.index.get_loc(label)
  File "C:\Users\x\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pandas\core\indexes\base.py", line 3805, in get_loc
    raise KeyError(key) from err
KeyError: 'topic'
Did you use excel to modify the input file? It might be an encoding issue.
 
Anyone else having an issue with seo minion not working with chrome? (It's not showing up at all - even reinstalled it too)
 
Anyone else having an issue with seo minion not working with chrome? (It's not showing up at all - even reinstalled it too)
You may have conflicts with other extensions. If you have other extensions, try a different instance of Chrome with no extensions, and try again.
 
Feeling like I am going to ask some super-noob questions :anyway:..

- How to run this Python script you provided?
- Do I have to download anything on my computer?
- Is there an online service?
- Can you share of a short ELI5 tutorial on how to start using python for running basic prompts?
 
Feeling like I am going to ask some super-noob questions :anyway:..

- How to run this Python script you provided?
- Do I have to download anything on my computer?
- Is there an online service?
- Can you share of a short ELI5 tutorial on how to start using python for running basic prompts?
You can run it on any python IDE like Pycharm. You need to download this app also download and install latest pythin version.

Google colab is easy online method to run this script. There you can add the 'input csv' to google drive and easily import to colab using a single command line.

There are some links shared above.
 
Cool stuff! thanks for this great share

But won't the site get penalized is Google sees that all the text is generated by AI?

Can we submit a website like this to be accepted by AdSense?
 
The script runs well for me but I do not know the reason why these 2 last lines does not work as intended

output_df = pd.DataFrame(results, columns = ['Topic', 'Generated Text'])

output_df.to_csv('C:\_data\out3.csv', index=False)

My Output file has 2 collums Topic avd Generated text and only one line with the first topic and not the generated text. In debug I see that openai retuns the text. I am on winows 11 - visual studio code ...
 
Just wanted to follow up on this real fast. If you aren’t getting the output that you want in regards to style, length, etc. just keep running it and changing things up on the prompt until you do.

I was having issues getting the right style and @warriorsam53 helped me out immensely but then the content was too short (300-500 words).

So I just kept testing different prompts, different words in the prompts, different word orders, etc. spent probably 3-4 hours in the last couple of days (or more) writing and testing different prompts.

Then tonight I got one that not only is the style I want but that puts out 800-1200 word articles as well!! Yes!!!

Just wanted to encourage everyone to keep fine tuning and messing with that prompt. Eventually when you change enough things around, try enough combinations, etc. you will finally get one that fits your style!
and you are keeping it a secret on a thread that offers free script, tips, etc... What is that secret prompt that gave you the style and amount of content ?
 
How are u guys formatting the output so it's ready for wp all import?
 
Cool stuff! thanks for this great share

But won't the site get penalized is Google sees that all the text is generated by AI?

Can we submit a website like this to be accepted by AdSense?

So far, AI sites aren't being penalized unless the content is really terrible. That said, I recommend that you edit the articles a bit and add some researched information to them if you want a more longer term approach. The content generated by AI sounds good but it's mostly useless fluff. If you can add useful and relevant info to your content, it's likely to perform much better.

Adsense approval shouldn't be a problem.
 
and you are keeping it a secret on a thread that offers free script, tips, etc... What is that secret prompt that gave you the style and amount of content ?
The secret is to spend time changing the prompt til you get one that you want that fits the style for your site. What style of writing I want and you want will be totally different and even will vary by site that the same person has.

If I have a site about finance and a site about dogs I will want totally different prompts to create the content. Trial and error until you get something that fits your sites style.
 
Back
Top