Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,34 +1,34 @@
|
|
1 |
-
# -*- coding: utf-8 -*-
|
2 |
-
"""
|
3 |
-
Fancy Addition Calculator with Sidebar and Animations
|
4 |
-
Created on Sat Jul 12 10:49:24 2025
|
5 |
-
@author: somil
|
6 |
-
"""
|
7 |
-
|
8 |
-
import streamlit as st
|
9 |
-
import time
|
10 |
-
|
11 |
-
# Page Config
|
12 |
-
st.set_page_config(page_title="Addition Calculator", page_icon="β", layout="centered")
|
13 |
-
|
14 |
-
# Sidebar for input
|
15 |
-
st.sidebar.header("Enter Numbers Here")
|
16 |
-
number1 = st.sidebar.number_input("Enter Number 1", min_value=0, max_value=100, value=12)
|
17 |
-
number2 = st.sidebar.number_input("Enter Number 2", min_value=0, max_value=100, value=12)
|
18 |
-
|
19 |
-
# Main title and animation
|
20 |
-
st.markdown("<h1 style='text-align: center;'>β¨ Basic Addition Calculator β¨</h1>", unsafe_allow_html=True)
|
21 |
-
st.markdown("<h3 style='text-align: center;'>Letβs crunch some numbers ββ</h3>", unsafe_allow_html=True)
|
22 |
-
|
23 |
-
# Animation for effect
|
24 |
-
with st.spinner("Calculating... π§ "):
|
25 |
-
time.sleep(1) # Simple delay for effect
|
26 |
-
|
27 |
-
# Result
|
28 |
-
result = number1 + number2
|
29 |
-
|
30 |
-
st.success(f"π The sum of **{number1}** and **{number2}** is: **{result}**")
|
31 |
-
|
32 |
-
# Footer message
|
33 |
-
st.markdown("---")
|
34 |
-
st.markdown("<p style='text-align: center;'>π Hope you have a <b>nice</b> day! π</p>", unsafe_allow_html=True)
|
|
|
1 |
+
# -*- coding: utf-8 -*-
|
2 |
+
"""
|
3 |
+
Fancy Addition Calculator with Sidebar and Animations
|
4 |
+
Created on Sat Jul 12 10:49:24 2025
|
5 |
+
@author: somil
|
6 |
+
"""
|
7 |
+
|
8 |
+
import streamlit as st
|
9 |
+
import time
|
10 |
+
|
11 |
+
# Page Config
|
12 |
+
st.set_page_config(page_title="Addition Calculator for Eveeryone", page_icon="β", layout="centered")
|
13 |
+
|
14 |
+
# Sidebar for input
|
15 |
+
st.sidebar.header("Enter Numbers Here")
|
16 |
+
number1 = st.sidebar.number_input("Enter Number 1", min_value=0, max_value=100, value=12)
|
17 |
+
number2 = st.sidebar.number_input("Enter Number 2", min_value=0, max_value=100, value=12)
|
18 |
+
|
19 |
+
# Main title and animation
|
20 |
+
st.markdown("<h1 style='text-align: center;'>β¨ Basic Addition Calculator β¨</h1>", unsafe_allow_html=True)
|
21 |
+
st.markdown("<h3 style='text-align: center;'>Letβs crunch some numbers ββ</h3>", unsafe_allow_html=True)
|
22 |
+
|
23 |
+
# Animation for effect
|
24 |
+
with st.spinner("Calculating... π§ "):
|
25 |
+
time.sleep(1) # Simple delay for effect
|
26 |
+
|
27 |
+
# Result
|
28 |
+
result = number1 + number2
|
29 |
+
|
30 |
+
st.success(f"π The sum of **{number1}** and **{number2}** is: **{result}**")
|
31 |
+
|
32 |
+
# Footer message
|
33 |
+
st.markdown("---")
|
34 |
+
st.markdown("<p style='text-align: center;'>π Hope you have a <b>nice</b> day! π</p>", unsafe_allow_html=True)
|