Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -20,16 +20,32 @@ st.set_page_config(page_title="Temperature Converter", page_icon="🌡", layout=
|
|
20 |
st.markdown(
|
21 |
"""
|
22 |
<style>
|
23 |
-
body {
|
24 |
-
|
25 |
-
color: white;
|
26 |
}
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
}
|
34 |
.stButton>button {
|
35 |
background-color: #FF5733;
|
@@ -48,6 +64,7 @@ st.markdown(
|
|
48 |
)
|
49 |
|
50 |
st.title("🌡 Temperature Converter")
|
|
|
51 |
|
52 |
# Input Section
|
53 |
unit = st.selectbox("Select the unit of the input temperature:", ["Celsius", "Fahrenheit", "Kelvin"])
|
@@ -63,4 +80,4 @@ if st.button("Convert"):
|
|
63 |
elif unit == "Kelvin":
|
64 |
st.success(f"{value}K = {result1:.2f}°C = {result2:.2f}°F")
|
65 |
|
66 |
-
st.markdown("**Made with ❤️ using Streamlit**")
|
|
|
20 |
st.markdown(
|
21 |
"""
|
22 |
<style>
|
23 |
+
html, body, [class*="st-"] {
|
24 |
+
transition: all 0.3s ease-in-out;
|
|
|
25 |
}
|
26 |
+
@media (prefers-color-scheme: light) {
|
27 |
+
body {
|
28 |
+
background: linear-gradient(to right, #E3F2FD, #BBDEFB);
|
29 |
+
color: #333;
|
30 |
+
}
|
31 |
+
.stApp {
|
32 |
+
background-color: rgba(255, 255, 255, 0.9);
|
33 |
+
padding: 20px;
|
34 |
+
border-radius: 10px;
|
35 |
+
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
|
36 |
+
}
|
37 |
+
}
|
38 |
+
@media (prefers-color-scheme: dark) {
|
39 |
+
body {
|
40 |
+
background: linear-gradient(to right, #1E1E1E, #424242);
|
41 |
+
color: white;
|
42 |
+
}
|
43 |
+
.stApp {
|
44 |
+
background-color: rgba(0, 0, 0, 0.8);
|
45 |
+
padding: 20px;
|
46 |
+
border-radius: 10px;
|
47 |
+
box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.2);
|
48 |
+
}
|
49 |
}
|
50 |
.stButton>button {
|
51 |
background-color: #FF5733;
|
|
|
64 |
)
|
65 |
|
66 |
st.title("🌡 Temperature Converter")
|
67 |
+
st.markdown("Convert temperatures between Celsius, Fahrenheit, and Kelvin effortlessly. Enter a value, choose a unit, and get instant results!")
|
68 |
|
69 |
# Input Section
|
70 |
unit = st.selectbox("Select the unit of the input temperature:", ["Celsius", "Fahrenheit", "Kelvin"])
|
|
|
80 |
elif unit == "Kelvin":
|
81 |
st.success(f"{value}K = {result1:.2f}°C = {result2:.2f}°F")
|
82 |
|
83 |
+
st.markdown("**Made with ❤️ using Streamlit**")
|