Making a DIY ChatGPT Using Python and Gradio ๐Ÿ˜ต

ยท

2 min read

As the title said, we will be learning how to create our own DIY ChatGPT without any need to deploy the machine, we will be using OpenAI's 'text-davinci-003 ' model in this project.

Speaking about the project, I will leave my GitHub Repo Link here for this same project.

Click Here for the GitHub Repo

๐Ÿ‘†๐Ÿป

About 'text-davinci-003' ๐Ÿง

Most capable GPT-3 model. Can do any task the other models can do, often with higher quality, longer output and better instruction-following. Also supports inserting completions within the text.

Davinci is the most capable model family and can perform any task the other models can perform and often with less instruction. For applications requiring a lot of understanding of the content, like summarization for a specific audience and creative content generation, Davinci is going to produce the best results. These increased capabilities require more computing resources, so Davinci costs more per API call and is not as fast as the other models.

Another area where Davinci shines is in understanding the intent of the text. Davinci is quite good at solving many kinds of logical problems and explaining the motives of the characters. Davinci has been able to solve some of the most challenging AI problems involving cause and effect.

Source: OpenAI

Coding your very Own ChatGPT Model

Steps to Follow ๐Ÿ˜

  • Open VS Code (or any other IDE).

  • Have the index.py code there.

  • Install the library dependancies in terminal as given: pip install openai pip install gradio

  • Get your API keys from https://platform.openai.com/account/api-keys.

  • Paste the keys in as a string in line 9.

  • Finally, simply run pythonindex.py in the terminal and TADAAA!

Screenshots:

Screenshot 2023-02-03 at 1 00 47 PM

NOTE: The environment runs locally by default, To create a public link, set share=True in launch() in line 55. The interactions between ChatGPT are limited (defined as credit by OpenAI), if you want to interact more with the AI then you might need a subscription.

If you had any trouble following up, please feel free to visit my GitHub Repo given above.

Peace โœŒ๐Ÿป

ย