In this article, we will learn how to give features like auto-completion to the data that is passed from Flask. Autocomplete basically means predicting the rest of the word when the user types something. This way human interaction also increases with every correct prediction. Let’s see how to do the same.
We will be using jquery for autocompletion.
To install flask type the below command in the terminal.
pip install flask
First, create a new directory for the project. Inside that create a new file and name it app.py.
Then, create a new directory inside the project to hold all the HTML files and name them templates. In this file, we have an input field where the user will type a string and the jquery function will provide the suggestions.
To run this app open cmd or terminal and run the below command.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course