1. Project Description
In a previous project last week, we built a desktop GUI app for converting kilometers to miles. Today, your task is to create a web app that converts kilometers to miles and vice-versa. Here is how the app should look more or less:
In the above interface, the user can:
Select which type of conversion to make.
Type in a number.
Press the “Convert” button to get the results.
You can use any Python web framework to build the web app, but the code given in the solution section uses the Streamlit framework which is the easiest Python web framework to use for building small web apps. In the resources section further below, you will find a link to a Streamlit tutorial.
2. Environment Setup Instructions (in your local IDE)
👉 Skip to the next step if you prefer to code this project in an online browser-based IDE or from your mobile phone.
Install streamlit:
pip install streamlit
To run the code, execute the main.py file with:
streamlit run main.py
3. Environment Setup Instructions (in an online IDE as alternative)
Prefer an online IDE where you can start coding right away in a pre-configured environment that has all the libraries installed? Use the link below:
https://replit.com/@ArditS/kml-to-miles-streamlit
4. Resources
You can learn about building streamlit apps in the article below:
https://pythonhow.com/what/build-streamlit-app/
Done! Huge step for me
Amazing!