import streamlit as st st.header('''Temperature Conversion App''') st.write('''Slide to convert value to Fahrenheit''') value = st.slider('Temperature in Fahrenheit') st.write(value, '°F is ', (value * 9/5) + 32, '°C') #Converting temperature to Fahrenheit st.write('''Slide to convert value to Fahrenheit''') value = st.slider('Temperature in Celcius') st.write(value, '° is ', (value - 32) * 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