Make a Fun Quiz for Your Partner on Valentine’s Day by Streamlit

Yesterday is Valentine’s day, maybe a normal gift such as a flower, a cake can’t give a surprise to your partner too much nowadays.

Because I’m studying Streamlit recently. So, I’m thinking why not do a fun quiz for surprising.

Before I show how to create an easy and fun Streamlit quiz website, let me quick introduce what’s Streamlit. From my viewpoint, Streamlit is a package that you can create and deploy a website. However, the website function most focus on data visualization and the interaction is the parameter changing for the visualization. It’s a useful tool for a data scientist to promote its work to others.

If your purpose only focus on data visualization, I suggest you use Tableau. Because it is faster and more powerful. However, if you want to show your trained machine learning model, it’s better to use Streamlit to show due to the flexibility is better even though tableau also can be integrated with python and R.

Okay, lets start. In this fun quiz by streamlit. I code it in python then deploy it to AWS EC2. I won’t explain any AWS here. I’ll write another post to describe it.

Let’s show the Streamlit Application first.

You can access it by clicking the link

First, you need to install streamlit. You may encounter some problems when installing it. In my case, it’s caused by python version and some related toolkits. I’ll write it in another post in the near future.

Turn on your command line.

pip install Streamlit

Then go to the directory of your python script.

d:
cd Streamlit Learning\streamlit_apps\valentine

Finally, run the script.

streamlit run "valentine's chanllenge.py"

It will open a new browser page automatically. If it’s not, just type the Local URL: in the browser. http://localhost:8501

Then you will see the app. Congratulaions!

The streamlit code is on my GitHub, feel free to take it for personal use.

One reply on “Make a Fun Quiz for Your Partner on Valentine’s Day by Streamlit”

Comments are closed.