ar885127 commited on
Commit
2c033c3
Β·
verified Β·
1 Parent(s): fb47ed1

Upload 2 files

Browse files
Files changed (2) hide show
  1. app.py +34 -0
  2. requirements.txt +1 -0
app.py ADDED
@@ -0,0 +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)
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ streamlit