From the course: Vector Databases in Practice: Deep Dive
Web apps and vector databases
- [Instructor] These days, web apps drive much of our activity on the internet. Unlike the classic static websites, modern web apps are powerful, interactive tools, just like traditional programs running on your local computing device. But just like a website, web apps are incredibly accessible. All you need to use a web app is an internet connection and a web browser, and this gives them great reach to a wide audience. In this chapter, you are going to build a web app that is powered by a vector database. More specifically, you'll be building a movie search and recommendation app. It's going to be able to support a variety of search methods and filters, which means you'll be able to put into practice all the skills we've learned to date. And the end user, in turn, will be able to run vector or hybrid searches and filter movies according to their criteria. But that's not all. The app's going to be able to recommend movies for its users based on what they tell the app about what they want to search and the viewing occasion. It's pretty neat, right? And to do this, we'll use the same movie database that we built earlier or the demo database. By this point, they should be identical, but if you're not sure, you can use the demo database. And we'll also use a Python framework called Streamlit. Streamlit makes it really easy to produce these data-driven web apps. Streamlit is another free, open-source Python library. Now, I know we haven't really covered Streamlit at all yet, but don't worry, the main reason for choosing Streamlit here was for its gentle learning curve. You shouldn't need much code at all to get it to produce good-looking, functional web apps. Additionally, for this exercise, we'll provide much of the Streamlit code for you. The truth is, most of the principles that you'll be learning and applying here relate to how to work with a vector database and to produce a data-driven app. These aspects will be applicable to other frameworks, whether using tools like Django or Flask, or even tools in other languages, like Express. What's important is for you to conceptually see how a vector database can be connected to these interactive elements of a web app, how a user's inputs can be translated into queries, and how those queries and the responses can produce results that then can display back to the user. Building a web app with a vector database might seem a little bit daunting now, but I think you'll very quickly start to see that you'll already have most of the skills to achieve this very, very cool task. Well, then, let's get on with building our web app.