Spaces:
Runtime error
Runtime error
| import os | |
| os.system('pip install streamlit_analytics') | |
| import streamlit as st | |
| import streamlit_analytics | |
| try: | |
| streamlit_analytics.track(load_from_json="demand.json") | |
| except: | |
| pass | |
| # Tickers to choose from | |
| # Updated crypto tickers | |
| tickers = ['BTC-USD', 'ETH-USD', 'BNB-USD', 'XRP-USD', 'ADA-USD', 'DOT-USD', 'DOGE-USD', 'SOL-USD'] | |
| # Image options for each crypto ticker | |
| image_options = { | |
| 'BTC-USD': 'BTC-USD.jpg', | |
| 'ETH-USD': 'ETH-USD.jpg', | |
| 'BNB-USD': 'BNB-USD.jpg', | |
| 'XRP-USD': 'XRP-USD.jpg', | |
| 'ADA-USD': 'ADA-USD.jpg', | |
| 'DOT-USD': 'DOT-USD.jpg', | |
| 'DOGE-USD': 'DOGE-USD.jpg', | |
| 'SOL-USD': 'SOL-USD.jpg', | |
| 'DOT-USD': 'DOT-USD.jpg', | |
| } | |
| # Crypto names for each ticker | |
| stock_names = { | |
| 'BTC-USD': 'Bitcoin', | |
| 'ETH-USD': 'Ethereum', | |
| 'BNB-USD': 'Binance Coin', | |
| 'XRP-USD': 'XRP', | |
| 'ADA-USD': 'Cardano', | |
| 'DOT-USD': 'Polkadot', | |
| 'DOGE-USD': 'Dogecoin', | |
| 'SOL-USD': 'Solana', | |
| 'DOT-USD': 'Polkadot', | |
| } | |
| st.title("Crypto Forecaster") | |
| # Create a dropdown to select a ticker | |
| with streamlit_analytics.track(save_to_json="demand.json"): | |
| selected_ticker = st.selectbox("Select a ticker:", tickers) | |
| # Display the image for the selected ticker | |
| if selected_ticker: | |
| image_path = image_options[selected_ticker] | |
| image = st.image(image_path) | |
| # Display the stock name for the selected ticker | |
| stock_name = stock_names[selected_ticker] | |
| st.write(f"Crypto name: {stock_name}") | |
| st.markdown(":warning: The content of this website is for educational purposes and is not a financial advice") | |
| st.markdown(":information_source: This model has been trained on the past 6 years of data until November 22nd, 2023 for each of the selected stocks. For a more comprehensive analysis with a different date range, access to thousands of stocks, hundreds of cryptocurrencies, and more up-to-date predictions, please visit our website: https://crypto.quu.fr") | |