Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Streamlit for Data Science

You're reading from   Streamlit for Data Science Create interactive data apps in Python

Arrow left icon
Product type Paperback
Published in Sep 2023
Publisher Packt
ISBN-13 9781803248226
Length 300 pages
Edition 2nd Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Tyler Richards Tyler Richards
Author Profile Icon Tyler Richards
Tyler Richards
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. An Introduction to Streamlit 2. Uploading, Downloading, and Manipulating Data FREE CHAPTER 3. Data Visualization 4. Machine Learning and AI with Streamlit 5. Deploying Streamlit with Streamlit Community Cloud 6. Beautifying Streamlit Apps 7. Exploring Streamlit Components 8. Deploying Streamlit Apps with Hugging Face and Heroku 9. Connecting to Databases 10. Improving Job Applications with Streamlit 11. The Data Project – Prototyping Projects in Streamlit 12. Streamlit Power Users 13. Other Books You May Enjoy
14. Index

Integrating external AI libraries – an OpenAI example

2023 has surely been the year of generative AI, with ChatGPT taking the world and developer community by storm. The availability of generative models behind services like ChatGPT has also exploded, with each of the largest technology companies coming out with their own versions (https://ai.meta.com/llama/ from Meta and https://bard.google.com/ from Google, for example). The most popular series of these generative models is OpenAI’s GPT (Generative Pre-trained Transformer). This section will show you how to use the OpenAI API to add generative AI to your Streamlit apps!

Authenticating with OpenAI

Our first step is to make an OpenAI account and get an API key. To do this, head over to https://platform.openai.com and create an account. Once you have created an account, go to the API keys section (https://platform.openai.com/account/api-keys) and press the button Create new secret key. Once you create the key...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at R$50/month. Cancel anytime