There are a lot of debates about how to trust Artificial Intelligence Large language models. In this blog post, I will further explore the capabilities of OpenAI API by developing an interactive application to build trust.
The previous blog "SAP Machine Learning Embedding in OpenAI" describes collecting and embedding data from various sources. The solution is presented in a Jupyter Notebook which you can run locally or with Binder. This requires technical skills to be convinced of what the code is doing and if it is working. Data in the previous blog were collected from different sources except one - YouTube.
Time is the most valuable commodity of all. Time is scarce, content is abundant, and you want to assimilate it in less time. While the video presents information in the most detailed way, it takes time to watch it. Summarizing it gets us back to the abstraction of it into words, the most time-efficient method of communication.
Two YouTube videos are available from the Challenge, "SAP HANA Cloud Machine Learning Challenge Kick-Off" and "SAP HANA Cloud Machine Learning Challenge Solutions". The corresponding video and the link are displayed by selecting one of them from the drop list. Pressing the "Transcript" button will display the transcript, if it exists, in the text area labelled "Transcript". If an index for embedding already exists, it doesn't cost any tokens to use. You must enter and validate your OpenAI key to embed the content and ask questions. For some videos, YouTube doesn't allow display within the application, but the "Extract Transcript" feature still works and you can open the video from the link. If everything goes correctly, the input text will open and you can ask questions.
Steps to run the YouTube Transcript OpenAI Assistant.
Select a Demo or Try It!
In case the Demo link is completed in case of Try it, you can enter it.
Press Extract Transcript. The transcript text is completed.
Press Download Transcript if you want to save it.
Enter the OpenAI API key and press Validate API key. If the key is valid, the message "OpenAI API key is valid" is displayed, otherwise an error message is displayed. In the app, OpenAI API calls GPT-3.5 models.
Below the Transcript area, you have an estimation of token costs. In the case of Demo, the index is already created. With Try It! costs are billed with the Embed transcript.
After Transcript is embedded the input You: is available and you can start asking questions. Questions (prompts) cost tokens.
Chat can be downloaded with Download chat TEXT or Download chat JSON.
To clear the chat press Clear chat.
Streamlit Sidebar is in the left top corner and the Options are in the right top corner. In Options in case of problems press Rerun.
Note: You don't need OpenAI API key to extract and download transcripts. You can use it as needed.
By clicking on the "Try It!" button, you have the option to input a YouTube link. It is important to ensure that the video you select includes a transcript. This will allow you to test the app with your own data and questions.🙂
There are many apps built on top of OpenAI that are evolving rapidly and adding new capabilities. One of these apps powered by recent GPT-4 is MONICA which is great at summarizing transcripts and increasing the efficiency and productivity of various tasks. Another app you can use is Glasp YouTube Summary,
On the other hand, having control over the code gives you more trust, and enables you to consider large-scale solutions for gathering and analyzing information.
Update December, 2023
Nowadays we have GPts, which allow one to create apps with embedded content and web access. However, YouTube transcript extraction is still not possible.