Spaces:
Build error
Build error
| import streamlit as st | |
| # Currency list | |
| countries = [ | |
| "Pakistan", "United States", "China", "India", "Russia", "Japan", "Germany", "United Kingdom", "France", "Brazil", | |
| "Canada", "Australia", "Italy", "South Korea", "Spain", "Mexico", "Indonesia", "Turkey", "Saudi Arabia", | |
| "Switzerland", "Netherlands", "Argentina", "South Africa", "Egypt", "Thailand", "Sweden", "Norway", "Poland", | |
| "Malaysia", "Singapore", "Philippines", "Vietnam", "Greece", "Portugal", "Denmark", "Iran", "Iraq", "Israel", | |
| "UAE (United Arab Emirates)", "Nigeria", "Kenya", "Colombia", "Chile", "Peru", "New Zealand", "Bangladesh", | |
| "Sri Lanka", "Nepal", "Afghanistan", "Qatar" | |
| ] | |
| st.title("Currency Converter π°") | |
| # Select currencies | |
| from_currency = st.selectbox("From Currency:", countries) | |
| to_currency = st.selectbox("To Currency:", countries) | |
| amount = st.number_input("Amount:", min_value=0.01, value=1.0) | |
| if st.button("Convert"): | |
| st.success(f"{amount} {from_currency} = [Converted Amount] {to_currency}") |