Multipage Web App
So far, we have worked with python streamlit library and we have built machine learning web applications using streamlit. In this blog we will see how to build a multi-page web app using streamlit.
Streamlit multipage web app
We can create multiple apps and navigate across each of them in a main app using a radio button. First, we have created separate apps for each shape to calculate the area of that particular shape example app1.py, app2.py, app3.py etc. Then we have created a main app and added a navigator using radio buttons. Now we just have to run the main app and navigate through the desired web page.
Area Calculator
This particular multipage web app we named it as area calculator. We have included introduction page and ten shapes of which we can calculate the area by putting required inputs. We have downloaded the multiapp.py framework from GitHub, as we have a greater number of web pages. Each shape in the navigation bar indicates new web page. We can select any shape from the navigation bar to find out the area of that particular shape. The code to calculate the area of each shape is written separately and save in a unique python file. We have also displayed the figure and formula to calculate the area.
Comments
Post a Comment