import streamlit as st #import streamlit right after installing it to the system st.header('''Temperature Conversion App''') #Head / App title #Converting temperature to Fahrenheit st.write('''Slide to convert Celcius to Fahrenheit''') value = st.slider('Temperature in Celcius') st.write(value, '°C is ', (value * 9/5) + 32, '°F') st.write('Conversion formula: (°C x 9/5) + 32 = °F') #Converting temperature to Celcius st.write('''Slide to convert Fahrenheit to Celcius''') value = st.slider('Temperature in Fahrenheit') st.write(value, '°F is ', (value - 32) * 5/9, '°C') st.write('Conversion formula: (°F - 32) x 5/9 = °C')
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter