Plotly in Streamlit, Pair Programming with AI and AI gets Personal
Reading my emails, I notice that DeepLearning.AI have announced a new course on using an LLM as a pair programmer; Microsoft have announced Copilot for Windows; and Google’s Bard can now read your emails and documents, and even check flights for you. I’ll talk about these things, and others, below.
But first I’ve recently found a problem in using Plotly in Streamlit - and then I solved it.
A New Plotly Component for Streamlit
(Medium article - no paywall with this link)
Streamlit only supports two Plotly themes: the Streamlit theme, or the default Plotly theme. We present a Streamlit component that will you to display Plotly charts more flexibly.
New Climate Warming Data
The planet keeps warming. Since I wrote New Data Demonstrates that 2023 was the Hottest Summer Ever we’ve had another record month for high temperatures globally. I based my article on a copy of the original data that you can find here. To get the latest version see the original data from Goddard Institute for Space Studies, here.
DeepLearning.AI - Pair Programming with a Large Language Model.
This collaborative course from DeepLearning.AI and Google uses the API for Google’s LLM, Palm. The course is introduced by DeepLearnig.AI’s Andrew Ng and the presenter is Laurence Moroney from Google.
Moroney starts by introducing the Palm model API and how to get connected and goes on to suggest a suitable method for creating prompts for the model that are useful in the pair-programming tasks that he is going to introduce.
Next comes the real content where we go through a number of pair programming scenarios: generating code from scratch; improving, re-writing and simplifying existing code; writing test cases; making code more efficient; and debugging code.
The final part is ‘Technical Dept’ where Moroney describes how difficult it can be to work on code that has been inherited from someone else and/or was written a while ago. Sometimes it is almost impossible to properly maintain this type of code. Enter the LLM. Moroney demonstrates, using some old complex code of his own, how an LLM can be used to explain and document the old code making the job of maintainance a lot easier.
This is a useful course and as with other DeepLearning.AI courses, it pairs video with live Jupyter Notebooks so that the learner can follow along with the coding and practice by using their own examples.
My only bugbear with the course is that it uses the API which generates its output as Markdown. This is a good option when the output is displayed in a Notebook Markdown cell, or Web page but not so much when the output is plain text. I wonder if using the same techniques that Moroney illustrates but with a chat web interface alongside a IDE where you can try out the code might be a better option.
Get personalised AI experiences from Windows
According to the blog post, above, there are over 150 new features, in the next Windows 11 update and it is one of their most ambitious yet, bringing the power of Copilot and new AI-powered experiences to apps like Paint, Photos, Clipchamp and more right to your Windows PC.
Unfortunately, I haven’t been able to check it out as it is not yet available in Europe but if you are on the other side of the Atlantic to me, you should be able to upgrade to take advantage of the new features.
Bard can now connect to your Google apps and services
Bard can now connect to your Gmail account and use the content to answer queries. Google gives an example of asking what dates a friend had suggested for a future hiking trip. It can also see your documents in Google Drive but when I tried this out it was only able to access the documents at the top level - subfolders seem to be invisible to Bard.
Bard can also connect to the Google Flights service, and it very quickly told me the times, dates and prices of flights from Madrid to Bilbao in Spain, when asked - it’s much faster than ploughing through Airline websites to find the information that you want. The result does come with a warning that you should check that the information is correct but that is only to be expected, I think.
I also asked: “Plan a trip from Barcelona to A Coruña in Spain going via Madrid. I want to stop overnight in Madrid and have at least half a day to sightsee. Then I want to fly to A Coruña. Please show me the flights and suggest hotels.” and it came up with a complete itinerary and suggest sightseeing locations in both Madrid and A Coruña. Here’s part of its response:
Not at all bad.
Bard can also connect to YouTube and when I asked it to find a video about changing the battery in a Mercedes Benz key fob, it gave me a link to the video and a list of instructions (from the video?). However, the link wasn’t clickable, so there is room for improvement, there.
Definitely something to look into.