SomilRastogi commited on
Commit
7b63c33
Β·
verified Β·
1 Parent(s): dc67603

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +34 -34
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)