https://github.com/yjg30737/python-openai-wandb-tutorial
Use GPT-3 in Python with the OpenAI and WanDB
https://github.com/yjg30737/python-openai-wandb-tutorial
gpt gpt-3 openai openai-wandb python-ai wandb
Last synced: about 2 months ago
JSON representation
Use GPT-3 in Python with the OpenAI and WanDB
- Host: GitHub
- URL: https://github.com/yjg30737/python-openai-wandb-tutorial
- Owner: yjg30737
- License: mit
- Created: 2023-01-08T00:35:38.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-05T01:01:28.000Z (about 3 years ago)
- Last Synced: 2024-12-29T08:42:11.241Z (about 1 year ago)
- Topics: gpt, gpt-3, openai, openai-wandb, python-ai, wandb
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# python-openai-wandb-tutorial
Use GPT-3 in Python with the OpenAI and WanDB
## How to Use
1. `git clone ~`
2. `python -m pip install openai wandb==0.13.4` - i'll explain below why i installed the certain version of wandb
3. get openai api from here after sign up or login
4. paste it to [MY_OPENAPI_API_KEY] in main.py
5. get wandb api, read this tutorial provided by wandb to figure it out
6. type `wandb login` and paste your wandb api when they demand it
7. type `python main.py` to run
8. wait till the end
※ If you can't install it then see the Note below
## Result
The answer generated by GPT-3 will be printed.
The question in this script is
`Correct this to standard English:\n\nShe no went to the market.`
The answer is
`She didn't go to the market.`
WanDB makes a bunch of files such as log in the project directory.
You can see the tables and graph of the statistics of this in your wandb profile page as well.
## Note
This is using the text-davinci-003 model at GPT-3 which is latest one at this moment(2023-01-08).
This is the most accurate one, and also the slowest.
You have to install certain version of wandb(0.13.4) since this error occurs.
If you can't install openai because of subprocess-exited-with-error, just download this, extract it, type
```
python setup.py install
```
It might install this darn thing
This project is based on this article.