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