Spaces:
Running
Running
| import ssl | |
| import logging | |
| # 로그 설정 | |
| #logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') | |
| # SSL 인증서 검증 비활성화 | |
| ssl._create_default_https_context = ssl._create_unverified_context | |
| def load_css(): | |
| with open('style.css', 'r', encoding='utf-8') as file: | |
| css = file.read() | |
| return f"<style>{css}</style>" | |
| def format_quantity(quantity): | |
| if quantity < 0: | |
| return f"({-quantity:,})" | |
| else: | |
| return f"{quantity:,}" | |
| currency_symbols = { | |
| "KRW": "₩", | |
| "USD": "$", | |
| "CAD": "$", | |
| "EUR": "€", | |
| "JPY": "¥", | |
| "GBP": "£" | |
| } | |
| def get_currency_symbol(currency_code): | |
| return currency_symbols.get(currency_code.upper(), "") | |
| def get_currency_codes(): | |
| return list(currency_symbols.keys()) | |